The Chart is not properly handling the ENCRYPTION_KEY in config.encryptionKey path:
Example:
config:
encryptionKeySecretName: "my-secret"
encryptionKeySecretKey: "encryption-key"
- This is not respected, and the encryption key is not properlybeing assigned as a variable into the containers.
If you want the Helm chart to automatically handle this better, you can modify the deployment-backend.yaml template:
Fix for deployment-backend.yaml
Replace this:
- name: ENCRYPTION_KEY
value: {{ .Values.config.encryptionKey | quote }}
- name: ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.config.encryptionKeySecretName }}
key: {{ .Values.config.encryptionKeySecretKey | default "encryption-key" }}
With this conditional logic:
{{- if and .Values.config.encryptionKeySecretName .Values.config.encryptionKeySecretKey }}
- name: ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.config.encryptionKeySecretName }}
key: {{ .Values.config.encryptionKeySecretKey | default "encryption-key" }}
{{- else if .Values.config.encryptionKey }}
- name: ENCRYPTION_KEY
value: {{ .Values.config.encryptionKey | quote }}
{{- end }}
What This Fix Does:
- If both encryptionKeySecretName and encryptionKeySecretKey are set, it only uses the secret.
- If only encryptionKey is set, it only uses the plaintext value.
- This ensures that both methods will never be used at the same time, preventing duplication and the duplicate values that the application complains about in the container logging.
The Chart is not properly handling the ENCRYPTION_KEY in config.encryptionKey path:
Example:
retool-values.yamlIf you want the Helm chart to automatically handle this better, you can modify the deployment-backend.yaml template:
Fix for deployment-backend.yaml
Replace this:
With this conditional logic:
What This Fix Does: