1Password / connect-helm-charts

Official 1Password Helm Charts
https://developer.1password.com
MIT License
90 stars 73 forks source link

Fix customEnvVars #197

Open NotABugItsAFeature opened 3 months ago

NotABugItsAFeature commented 3 months ago

Your environment

Chart Version: latest

Helm Version: latest

Kubernetes Version: not relevant

What happened?

The customEnvVars are not applied properly for the connect pod. It only applies to the connect-api container and doesn't apply on the connect-sync container. There's no separate values to set for this. So either the customEnvVars should be applied to both or there should be a distinct setting to configure each. The first sounds fine since usually you'll use the same proxy settings for these components.

What did you expect to happen?

That customEnvVars are working. In this case for using a proxy.

Steps to reproduce

Deploy connect pod with customEnvVars. Check env vars on both containers in the pod.

Notes & Logs

This is the patch. At least this will result in a consistent state for each container.

*** connect-deployment.yaml.orig        2024-05-31 10:42:43.592303156 +0200
--- connect-deployment.yaml     2024-05-31 10:47:25.302331200 +0200
***************
*** 137,142 ****
--- 137,146 ----
              - name: OP_LOG_LEVEL
                value: "{{ .Values.connect.sync.logLevel }}"
              {{- include "onepassword-connect.profilerConfig" . | indent 12 }}
+             {{- range .Values.connect.customEnvVars}}
+             - name: {{ .name }}
+               value: {{ .value }}
+             {{- end }}
            {{- if .Values.connect.probes.readiness }}
            readinessProbe:
              httpGet
NotABugItsAFeature commented 3 months ago

@volodymyrZotov can the patch be applied?