refactor(authentication): streamline secret reference assignment in deployment.yaml
- Introduced a variable for the target secret name to improve readability and maintainability of the secret injection logic. - This change enhances the clarity of the deployment configuration for the authentication module. Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
e34a57bef5
commit
05aa22215e
@ -107,11 +107,12 @@ spec:
|
||||
key: {{ $key | snakecase | upper }}
|
||||
{{- end }}
|
||||
# inject from secret created by FreeleapsSecret object
|
||||
{{ $targetSecretName := .Values.authentication.secrets.target.name }}
|
||||
{{- range .Values.authentication.secrets.data }}
|
||||
- name: {{ .key | snakecase | upper }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.authentication.secrets.target.name }}
|
||||
name: {{ $targetSecretName }}
|
||||
key: {{ .key }}
|
||||
{{- end }}
|
||||
{{- if .Values.logIngest.enabled }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user