From 8830615abcf17e0cd3991fbf963debfb161784cd Mon Sep 17 00:00:00 2001 From: Anton Mironov <20403+mironov@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:14:03 -0700 Subject: [PATCH] [Helm] Provide auth in probes if it is set (#1065) If the auth is set, the probes fail with a 401 error. --- charts/whoogle/templates/deployment.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/whoogle/templates/deployment.yaml b/charts/whoogle/templates/deployment.yaml index 6d25dc2..3da9f1e 100644 --- a/charts/whoogle/templates/deployment.yaml +++ b/charts/whoogle/templates/deployment.yaml @@ -52,10 +52,20 @@ spec: httpGet: path: / port: http + {{- if and .Values.conf.WHOOGLE_USER .Values.conf.WHOOGLE_PASS }} + httpHeaders: + - name: Authorization + value: Basic {{ b64enc (printf "%s:%s" .Values.conf.WHOOGLE_USER .Values.conf.WHOOGLE_PASS) }} + {{- end }} readinessProbe: httpGet: path: / port: http + {{- if and .Values.conf.WHOOGLE_USER .Values.conf.WHOOGLE_PASS }} + httpHeaders: + - name: Authorization + value: Basic {{ b64enc (printf "%s:%s" .Values.conf.WHOOGLE_USER .Values.conf.WHOOGLE_PASS) }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }}