diff --git a/packages/system/keycloak/templates/sts.yaml b/packages/system/keycloak/templates/sts.yaml index 42d88dc82..d91b56cfe 100644 --- a/packages/system/keycloak/templates/sts.yaml +++ b/packages/system/keycloak/templates/sts.yaml @@ -1,6 +1,11 @@ {{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }} {{- $host := index $cozyConfig.data "root-host" }} + +{{- $existingPassword := lookup "v1" "Secret" "cozy-keycloak" "{{ .Release.Name }}-credentials" }} {{- $password := randAlphaNum 16 -}} +{{- if $existingPassword }} + {{- $password = index $existingPassword.data "password" | b64dec }} +{{- end }} apiVersion: v1 kind: Secret