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:
zhenyus 2025-08-18 15:29:00 +08:00
parent e34a57bef5
commit 05aa22215e

View File

@ -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 }}