Fix liveness probe in oidc client
The liveness probe was not setup correctly causing probe warnings. This update added the handling for the readiness and liveness probes. The probe parameters are also setup to be configurable in the helm charts. Partial-bug: 1877172 Change-Id: Ibe2d760897e761d361c3d4fe8c1ce41b33609d54 Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
parent
3efc1859fb
commit
957fc7c209
@ -40,14 +40,22 @@ spec:
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
path: {{ .Values.livenessProbe.httpPath }}
|
||||
port: 5555
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
path: {{ .Values.readinessProbe.httpPath }}
|
||||
port: 5555
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
|
@ -39,6 +39,20 @@ ingress:
|
||||
paths: []
|
||||
tls: []
|
||||
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 1
|
||||
failureThreshold: 1
|
||||
httpPath: "/healthz"
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 1
|
||||
failureThreshold: 1
|
||||
httpPath: "/healthz"
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
|
||||
resources: {}
|
||||
|
||||
nodeSelector: {}
|
||||
|
@ -177,6 +177,10 @@ func start_app(config Config) {
|
||||
|
||||
http.HandleFunc("/", config.a.handleLogin)
|
||||
http.HandleFunc(u.Path, config.a.handleCallback)
|
||||
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte("ok"))
|
||||
})
|
||||
|
||||
switch listenURL.Scheme {
|
||||
case "http":
|
||||
|
Loading…
Reference in New Issue
Block a user