From f6cbfe767b2331aad29923866bf461ce3ddd6bac Mon Sep 17 00:00:00 2001 From: Dimitri Saridakis Date: Fri, 16 Jun 2023 15:20:26 +0100 Subject: [PATCH] perf: add readiness and health probes --- cmd/kar-controllers/app/server.go | 1 + deployment/mcad-controller/templates/deployment.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/cmd/kar-controllers/app/server.go b/cmd/kar-controllers/app/server.go index 905edcfdc..dc72179dd 100644 --- a/cmd/kar-controllers/app/server.go +++ b/cmd/kar-controllers/app/server.go @@ -86,3 +86,4 @@ func listenHealthProbe(opt *options.ServerOption) error { return nil } + diff --git a/deployment/mcad-controller/templates/deployment.yaml b/deployment/mcad-controller/templates/deployment.yaml index 56a7445d0..7990a71f9 100644 --- a/deployment/mcad-controller/templates/deployment.yaml +++ b/deployment/mcad-controller/templates/deployment.yaml @@ -357,6 +357,18 @@ spec: - name: agent-config-vol mountPath: /root/kubernetes #{{ end }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + periodSeconds: 5 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: /healthz + port: 8081 + periodSeconds: 5 + timeoutSeconds: 5 #{{ if .Values.configMap.name }} envFrom: - configMapRef: