Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add support for keycloak admin api client values #705

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: update lagoon AppVersion to v2.22.0
links:
- name: lagoon releases
url: https://github.com/uselagoon/lagoon/releases/tag/v2.22.0
- kind: changed
description: update ssh-portal-api and ssh-token to v0.41.3
links:
- name: lagoon-ssh-portal releases
url: https://github.com/uselagoon/lagoon-ssh-portal/releases
- kind: changed
description: update NATS chart dependency to v1.2.x
- kind: changed
description: add KEYCLOAK_LAGOON_UI_OIDC_CLIENT_SECRET variable to keycloak and ui deployment
description: add KEYCLOAK_ADMIN_API_CLIENT_SECRET variable to keycloak and api deployment
10 changes: 10 additions & 0 deletions charts/lagoon-core/templates/api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ spec:
secretKeyRef:
name: {{ include "lagoon-core.keycloak.fullname" . }}
key: KEYCLOAK_API_CLIENT_SECRET
- name: KEYCLOAK_ADMIN_API_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "lagoon-core.keycloak.fullname" . }}
key: KEYCLOAK_ADMIN_API_CLIENT_SECRET
- name: KEYCLOAK_FRONTEND_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/auth
Expand Down Expand Up @@ -155,6 +160,11 @@ spec:
secretKeyRef:
name: {{ include "lagoon-core.keycloak.fullname" . }}
key: KEYCLOAK_API_CLIENT_SECRET
- name: KEYCLOAK_ADMIN_API_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "lagoon-core.keycloak.fullname" . }}
key: KEYCLOAK_ADMIN_API_CLIENT_SECRET
- name: KEYCLOAK_FRONTEND_URL
{{- if .Values.keycloakFrontEndURL }}
value: {{ .Values.keycloakFrontEndURL }}/auth
Expand Down
2 changes: 2 additions & 0 deletions charts/lagoon-core/templates/keycloak.secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This somewhat complex logic is intended to:
{{- $keycloakDBPassword := coalesce .Values.keycloakDBPassword (ternary (randAlpha 32) (index $data "DB_PASSWORD" | default "" | b64dec) (index $data "DB_PASSWORD" | empty)) }}
{{- $keycloakAdminPassword := coalesce .Values.keycloakAdminPassword (ternary (randAlpha 32) (index $data "KEYCLOAK_ADMIN_PASSWORD" | default "" | b64dec) (index $data "KEYCLOAK_ADMIN_PASSWORD" | empty)) }}
{{- $keycloakAPIClientSecret := coalesce .Values.keycloakAPIClientSecret (ternary uuidv4 (index $data "KEYCLOAK_API_CLIENT_SECRET" | default "" | b64dec) (index $data "KEYCLOAK_API_CLIENT_SECRET" | empty)) }}
{{- $keycloakAdminAPIClientSecret := coalesce .Values.keycloakAdminAPIClientSecret (ternary uuidv4 (index $data "KEYCLOAK_ADMIN_API_CLIENT_SECRET" | default "" | b64dec) (index $data "KEYCLOAK_ADMIN_API_CLIENT_SECRET" | empty)) }}
{{- $keycloakAuthServerClientSecret := coalesce .Values.keycloakAuthServerClientSecret (ternary uuidv4 (index $data "KEYCLOAK_AUTH_SERVER_CLIENT_SECRET" | default "" | b64dec) (index $data "KEYCLOAK_AUTH_SERVER_CLIENT_SECRET" | empty)) }}
{{- $keycloakServiceAPIClientSecret := coalesce .Values.keycloakServiceAPIClientSecret (ternary uuidv4 (index $data "KEYCLOAK_SERVICE_API_CLIENT_SECRET" | default "" | b64dec) (index $data "KEYCLOAK_SERVICE_API_CLIENT_SECRET" | empty)) }}
{{- $keycloakLagoonUIOIDCClientSecret := coalesce .Values.keycloakLagoonUIOIDCClientSecret (ternary uuidv4 (index $data "KEYCLOAK_LAGOON_UI_OIDC_CLIENT_SECRET" | default "" | b64dec) (index $data "KEYCLOAK_LAGOON_UI_OIDC_CLIENT_SECRET" | empty)) }}
Expand All @@ -26,6 +27,7 @@ stringData:
DB_PASSWORD: {{ $keycloakDBPassword | quote }}
KEYCLOAK_ADMIN_PASSWORD: {{ $keycloakAdminPassword }}
KEYCLOAK_API_CLIENT_SECRET: {{ $keycloakAPIClientSecret }}
KEYCLOAK_ADMIN_API_CLIENT_SECRET: {{ $keycloakAdminAPIClientSecret }}
KEYCLOAK_AUTH_SERVER_CLIENT_SECRET: {{ $keycloakAuthServerClientSecret | quote }}
KEYCLOAK_SERVICE_API_CLIENT_SECRET: {{ $keycloakServiceAPIClientSecret | quote }}
KEYCLOAK_LAGOON_UI_OIDC_CLIENT_SECRET: {{ $keycloakLagoonUIOIDCClientSecret | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/lagoon-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
# jwtSecret:
# keycloakAdminPassword:
# keycloakAPIClientSecret:
# keycloakAdminAPIClientSecret:
# keycloakAuthServerClientSecret:
# keycloakLagoonUIOIDCClientSecret:
# keycloakDBPassword:
Expand Down
Loading