Skip to content

Commit

Permalink
Updated helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Awambeng committed Dec 11, 2024
1 parent 4221e2e commit 6ca26d2
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 9 deletions.
24 changes: 23 additions & 1 deletion keycloak-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,26 @@ spec:
imagePullPolicy: {{ .Values.keycloak.image.pullPolicy }}
ports:
- containerPort: {{ .Values.keycloak.service.port }}

env:
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.keycloak.secrets }}
key: KC_BOOTSTRAP_ADMIN_PASSWORD
volumeMounts:
{{- range .Values.keycloak.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
volumes:
{{- range .Values.keycloak.volumes }}
- name: {{ .name }}
configMap:
name: {{ .configMap.name }}
optional: {{ .configMap.optional | default false }}
items:
{{- range .configMap.items }}
- key: {{ .key }}
path: {{ .path }}
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion keycloak-chart/templates/external-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ spec:
- secretKey: KC_DB_PASSWORD
remoteRef:
key: {{ .Values.awsSecretName }}
property: KC_DB_PASSWORD
property: KC_DB_PASSWORD
- secretKey: KC_BOOTSTRAP_ADMIN_PASSWORD
remoteRef:
key: {{ .Values.awsSecretName }}
property: KC_BOOTSTRAP_ADMIN_PASSWORD
2 changes: 0 additions & 2 deletions keycloak-chart/templates/services.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# Keycloak service
apiVersion: v1
kind: Service
metadata:
Expand All @@ -16,7 +15,6 @@ spec:
app: {{ include "keycloak-chart.name" . }}

---
# Postgres service
{{- if .Values.postgres.enabled }}
apiVersion: v1
kind: Service
Expand Down
22 changes: 17 additions & 5 deletions keycloak-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
usePostgresInCluster: true # If true, use internal PostgreSQL in the cluster; false will use external RDS
usePostgresInCluster: false # If true, use internal PostgreSQL in the cluster; false will use external RDS
host: postgres-service
rdsEndpoint: datev-rds.c9ocg0umkn0m.eu-central-1.rds.amazonaws.com
fullnameOverride: keycloak
Expand All @@ -14,17 +14,29 @@ keycloak:
type: LoadBalancer
port: 8443
imagePullSecret: ghcr-pull-secret
envConfigMapName: keycloak-env-config
volumes:
- name: env-volume
configMap:
name: keycloak-env-config
optional: true
items:
- key: ".env"
path: ".env"
volumeMounts:
- name: env-volume
mountPath: /opt/keycloak/env

# Postgresql Configuration
postgres:
enabled: true
enabled: false
image:
repository: postgres
tag: latest
pullPolicy: IfNotPresent
replicas: 1
service:
name: postgres-services
name: postgres-service
type: ClusterIP
port: 5432
volumes:
Expand All @@ -34,8 +46,8 @@ postgres:
- mountPath: /var/lib/postgresql/data
name: db-data
env:
POSTGRES_DB: keycloakdb
POSTGRES_USER: keycloakadmin
POSTGRES_DB: kc_ssi_db
POSTGRES_USER: datevadmin

# External Secret Store
awsSecretName: datev-wallet-secrets
Expand Down

0 comments on commit 6ca26d2

Please sign in to comment.