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
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: {{ .Values.livenessProbe.httpPath }}
|
||||||
port: http
|
port: 5555
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
|
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||||
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: {{ .Values.readinessProbe.httpPath }}
|
||||||
port: http
|
port: 5555
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
|
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||||
|
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -39,6 +39,20 @@ ingress:
|
|||||||
paths: []
|
paths: []
|
||||||
tls: []
|
tls: []
|
||||||
|
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 1
|
||||||
|
failureThreshold: 1
|
||||||
|
httpPath: "/healthz"
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 1
|
||||||
|
failureThreshold: 1
|
||||||
|
httpPath: "/healthz"
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 1
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
@ -177,6 +177,10 @@ func start_app(config Config) {
|
|||||||
|
|
||||||
http.HandleFunc("/", config.a.handleLogin)
|
http.HandleFunc("/", config.a.handleLogin)
|
||||||
http.HandleFunc(u.Path, config.a.handleCallback)
|
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 {
|
switch listenURL.Scheme {
|
||||||
case "http":
|
case "http":
|
||||||
|
Loading…
Reference in New Issue
Block a user