Skip to content

Commit 595846f

Browse files
committed
feat(chart): add server ConfigMap with keycloak.json
- Add showcase.server.keycloak values (YAML → JSON) - Create server/configmap.yaml template with keycloak.json key - Mount keycloak.json to /app/server/config/keycloak.json in server deployment - Add showcase.server.configmapName helper Signed-off-by: Emiliano Suñé <2395873+esune@users.noreply.github.com>
1 parent ea92802 commit 595846f

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "showcase.server.configmapName" . }}
5+
namespace: {{ include "showcase.namespace" . | quote }}
6+
labels: {{- include "showcase.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: server
8+
data:
9+
keycloak.json: |
10+
{{- .Values.showcase.server.keycloak | toJson | nindent 4 }}

charts/showcase/templates/server/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,17 @@ spec:
171171
port: http
172172
initialDelaySeconds: 15
173173
periodSeconds: 10
174+
volumeMounts:
175+
- name: server-config
176+
mountPath: /app/server/config/keycloak.json
177+
subPath: keycloak.json
174178
{{- with .Values.showcase.server.resources }}
175179
resources: {{- toYaml . | nindent 12 }}
176180
{{- end }}
181+
volumes:
182+
- name: server-config
183+
configMap:
184+
name: {{ include "showcase.server.configmapName" . }}
177185
{{- with .Values.showcase.server.nodeSelector }}
178186
nodeSelector: {{- toYaml . | nindent 8 }}
179187
{{- end }}

charts/showcase/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ showcase:
119119
mongodbConnection:
120120
database: bcwallet_demo
121121
authSource: admin
122+
## Keycloak config injected as /app/server/config/keycloak.json via ConfigMap.
123+
## Specify as YAML here; the chart converts it to JSON automatically.
124+
keycloak:
125+
keycloakUrl: "https://dev.loginproxy.gov.bc.ca"
126+
keycloakRealm: digitaltrust-citz
122127
## Non-sensitive runtime env vars for the server Deployment.
123128
## Use existingSecret for sensitive credentials and MONGODB_URI.
124129
## Example:

0 commit comments

Comments
 (0)