From 05aa22215e21e5be9bcf3065f38e0efd2ad46fbd Mon Sep 17 00:00:00 2001 From: zhenyus Date: Mon, 18 Aug 2025 15:29:00 +0800 Subject: [PATCH] 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 --- .../authentication/templates/authentication/deployment.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/deployment.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/deployment.yaml index 2f33800b..214924f8 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/deployment.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/deployment.yaml @@ -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 }}