Skip to content

Commit

Permalink
Add auth in proxy health check
Browse files Browse the repository at this point in the history
  • Loading branch information
yaalsn committed Sep 22, 2023
1 parent 5879866 commit a0b5281
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions charts/pulsar/templates/proxy/proxy-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,27 +192,36 @@ spec:
imagePullPolicy: {{ .Values.images.proxy.pullPolicy }}
{{- if .Values.proxy.probe.liveness.enabled }}
livenessProbe:
httpGet:
path: /status.html
port: {{ .Values.proxy.ports.http }}
httpGet: null
exec:
command:
- /bin/bash
- -c
- 'res=$(curl -H "Authorization: Bearer $brokerClientAuthenticationParameters" http://localhost:8080/status.html);if [[ $res == "OK" ]]; then exit 0; else exit 1; fi'
initialDelaySeconds: {{ .Values.proxy.probe.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.proxy.probe.liveness.periodSeconds }}
failureThreshold: {{ .Values.proxy.probe.liveness.failureThreshold }}
{{- end }}
{{- if .Values.proxy.probe.readiness.enabled }}
readinessProbe:
httpGet:
path: /status.html
port: {{ .Values.proxy.ports.http }}
httpGet: null
exec:
command:
- /bin/bash
- -c
- 'res=$(curl -H "Authorization: Bearer $brokerClientAuthenticationParameters" http://localhost:8080/status.html);if [[ $res == "OK" ]]; then exit 0; else exit 1; fi'
initialDelaySeconds: {{ .Values.proxy.probe.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.proxy.probe.readiness.periodSeconds }}
failureThreshold: {{ .Values.proxy.probe.readiness.failureThreshold }}
{{- end }}
{{- if .Values.proxy.probe.startup.enabled }}
startupProbe:
httpGet:
path: /status.html
port: {{ .Values.proxy.ports.http }}
httpGet: null
exec:
command:
- /bin/bash
- -c
- 'res=$(curl -H "Authorization: Bearer $brokerClientAuthenticationParameters" http://localhost:8080/status.html);if [[ $res == "OK" ]]; then exit 0; else exit 1; fi'
initialDelaySeconds: {{ .Values.proxy.probe.startup.initialDelaySeconds }}
periodSeconds: {{ .Values.proxy.probe.startup.periodSeconds }}
failureThreshold: {{ .Values.proxy.probe.startup.failureThreshold }}
Expand Down

0 comments on commit a0b5281

Please sign in to comment.