Skip to content

Commit 76338a7

Browse files
committed
Initial code
Change-Id: I9d616358e44b7a81ede8eda7d65d8f33e70d0faa
1 parent bf2b240 commit 76338a7

18 files changed

+614
-0
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'Build Release'
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
uses: NeCTAR-RC/gh-actions/.github/workflows/build-release.yaml@master

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
charts/*

.gitreview

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[gerrit]
2+
host=review.rc.nectar.org.au
3+
port=29418
4+
project=NeCTAR-RC/keystone-helm.git
5+
defaultbranch=master

.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

Chart.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: common
3+
repository: oci://registry-1.docker.io/bitnamicharts
4+
version: 2.29.1
5+
- name: nectarlib
6+
repository: oci://registry.rc.nectar.org.au/nectar-helm
7+
version: 3.0.2
8+
digest: sha256:cb1e27162273908127931b8a46792d0981d36bdbfdd48832a22390f0d4c19a59
9+
generated: "2025-02-06T11:39:56.006191974+11:00"

Chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: keystone
3+
description: A Helm chart for Openstack Keystone
4+
type: application
5+
version: 1.0.0
6+
appVersion: 25.0.0-14-g155f38a86-5-9
7+
dependencies:
8+
- name: common
9+
repository: oci://registry-1.docker.io/bitnamicharts
10+
version: 2.29.1
11+
- name: nectarlib
12+
version: 3.0.2
13+
repository: oci://registry.rc.nectar.org.au/nectar-helm

renovate.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
3+
}

templates/NOTES.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.api.ingress.enabled }}
3+
{{- range $host := .Values.api.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.api.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
6+
{{- end }}
7+
{{- end }}
8+
{{- else if contains "NodePort" .Values.service.type }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nectarlib.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
echo http://$NODE_IP:$NODE_PORT
12+
{{- else if contains "LoadBalancer" .Values.service.type }}
13+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nectarlib.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nectarlib.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
echo http://$SERVICE_IP:{{ .Values.service.port }}
17+
{{- else if contains "ClusterIP" .Values.service.type }}
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nectarlib.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20+
echo "Visit http://127.0.0.1:8080 to use your application"
21+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
22+
{{- end }}

templates/_helpers.tpl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{/*
2+
Vault annotations
3+
*/}}
4+
{{- define "keystone.vaultAnnotations" -}}
5+
vault.hashicorp.com/role: "{{ .Values.vault.role }}"
6+
vault.hashicorp.com/agent-inject: "true"
7+
vault.hashicorp.com/agent-pre-populate-only: "true"
8+
vault.hashicorp.com/agent-inject-status: "update"
9+
vault.hashicorp.com/secret-volume-path-secrets.conf: /etc/keystone/keystone.conf.d
10+
vault.hashicorp.com/agent-inject-secret-secrets.conf: "{{ .Values.vault.settings_secret }}"
11+
vault.hashicorp.com/agent-inject-template-secrets.conf: |
12+
{{ print "{{- with secret \"" .Values.vault.settings_secret "\" -}}" }}
13+
{{ print "[identity]" }}
14+
{{ print "password_reset_token={{ .Data.data.password_reset_token }}" }}
15+
{{ print "[rcshibboleth]" }}
16+
{{ print "admin_token={{ .Data.data.rcshib_admin_token }}" }}
17+
{{ print "[database]" }}
18+
{{ print "connection={{ .Data.data.database_connection }}" }}
19+
{{ print "{{- end -}}" }}
20+
{{- end }}

templates/_keystone_conf.tpl

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{- define "keystone-conf" }}
2+
[DEFAULT]
3+
public_endpoint={{ .Values.conf.public_endpoint }}
4+
max_token_size=255
5+
6+
[auth]
7+
methods=external,password,token,oauth1,mapped,application_credential,totp
8+
9+
{{- if .Values.conf.cors.allowed_origin }}
10+
[cors]
11+
allowed_origin={{ .Values.conf.cors.allowed_origin }}
12+
allow_headers=Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma,X-Auth-Token
13+
{{- end }}
14+
15+
[token]
16+
allow_expired_window=604800
17+
expiration=21600
18+
provider=fernet
19+
revoke_by_id=True
20+
21+
{{- if .Values.conf.rcshib.allowed_hosts }}
22+
[rcshibboleth]
23+
allowed_hosts={{ join "," .Values.conf.rcshib.allowed_hosts }}
24+
{{- end }}
25+
26+
[fernet_tokens]
27+
key_repository=/etc/keystone/fernet-keys
28+
max_active_keys=12
29+
30+
[credential]
31+
key_repository=/etc/keystone/credential-keys
32+
33+
{{- if .Values.conf.cache.memcached_servers }}
34+
[cache]
35+
backend=oslo_cache.memcache_pool
36+
enabled=True
37+
memcached_servers={{ join "," .Values.conf.cache.memcached_servers }}
38+
{{- end }}
39+
40+
[oslo_policy]
41+
policy_file=/etc/keystone/policy.yaml
42+
43+
[database]
44+
connection_recycle_time=60
45+
46+
[oslo_messaging_notifications]
47+
driver=log
48+
49+
{{- end }}

0 commit comments

Comments
 (0)