mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Check webhooks are present during liveness (#1748)
Fixes #1747 Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
This commit is contained in:
parent
0131f375f1
commit
91713ee566
4 changed files with 12 additions and 8 deletions
|
@ -78,7 +78,7 @@ livenessProbe:
|
|||
port: 9443
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 2
|
||||
successThreshold: 1
|
||||
|
|
|
@ -2443,13 +2443,13 @@ spec:
|
|||
image: ghcr.io/kyverno/kyverno:v1.3.5-rc1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 4
|
||||
failureThreshold: 2
|
||||
httpGet:
|
||||
path: /health/liveness
|
||||
port: 9443
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
name: kyverno
|
||||
|
|
|
@ -76,10 +76,10 @@ spec:
|
|||
path: /health/liveness
|
||||
port: 9443
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 4
|
||||
failureThreshold: 2
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
|
|
|
@ -221,7 +221,11 @@ func NewWebhookServer(
|
|||
// Fail this request if Kubernetes should restart this instance
|
||||
mux.HandlerFunc("GET", config.LivenessServicePath, func(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
if err := ws.webhookRegister.Check(); err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
})
|
||||
|
||||
// Handle Readiness responds to a Kubernetes Readiness probe
|
||||
|
|
Loading…
Add table
Reference in a new issue