From 18aa9c47d3ea8108a339e7b51cef53b8890d6388 Mon Sep 17 00:00:00 2001 From: Anton Mironov Date: Sun, 10 Sep 2023 20:55:44 -0700 Subject: [PATCH] Provide auth in probes if it is set --- 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 }}