{{- $secret := (lookup "v1" "Secret" .Values.namespace .Values.keycloakClient.secretName ) -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.keycloakClient.secretName }}
type: Opaque
  {{- if $secret }}
data:
  clientSecret: {{ $secret.data.clientSecret }}
  {{- else }}
stringData:
  {{- $clientSecret := uuidv4 | quote }}
  clientSecret: {{ $clientSecret }}
{{- end -}}
