From f50a3fa119b32308562bee3f58a508f554724588 Mon Sep 17 00:00:00 2001 From: Amir Alavi Date: Wed, 12 Jan 2022 11:40:57 -0500 Subject: [PATCH] make livenessprobe consistent across manifests; make helm chart configurable via values.yaml --- charts/descheduler/templates/cronjob.yaml | 2 ++ charts/descheduler/templates/deployment.yaml | 8 +------- charts/descheduler/values.yaml | 9 +++++++++ kubernetes/deployment/deployment.yaml | 2 +- kubernetes/job/job.yaml | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index e7751434d..3f3d31d1c 100644 --- a/charts/descheduler/templates/cronjob.yaml +++ b/charts/descheduler/templates/cronjob.yaml @@ -68,6 +68,8 @@ spec: - {{ $value | quote }} {{- end }} {{- end }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 16 }} resources: {{- toYaml .Values.resources | nindent 16 }} securityContext: diff --git a/charts/descheduler/templates/deployment.yaml b/charts/descheduler/templates/deployment.yaml index 3e4d85189..97d149e8e 100644 --- a/charts/descheduler/templates/deployment.yaml +++ b/charts/descheduler/templates/deployment.yaml @@ -48,13 +48,7 @@ spec: - containerPort: 10258 protocol: TCP livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10258 - scheme: HTTPS - initialDelaySeconds: 3 - periodSeconds: 3 + {{- toYaml .Values.livenessProbe | nindent 12 }} resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: diff --git a/charts/descheduler/values.yaml b/charts/descheduler/values.yaml index b3ad6281e..75aaabef6 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -94,3 +94,12 @@ serviceAccount: # The name of the ServiceAccount to use. # If not set and create is true, a name is generated using the fullname template name: + +livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10258 + scheme: HTTPS + initialDelaySeconds: 3 + periodSeconds: 10 diff --git a/kubernetes/deployment/deployment.yaml b/kubernetes/deployment/deployment.yaml index 9b19b3486..9dd168dad 100644 --- a/kubernetes/deployment/deployment.yaml +++ b/kubernetes/deployment/deployment.yaml @@ -40,7 +40,7 @@ spec: port: 10258 scheme: HTTPS initialDelaySeconds: 3 - periodSeconds: 3 + periodSeconds: 10 resources: requests: cpu: 500m diff --git a/kubernetes/job/job.yaml b/kubernetes/job/job.yaml index f4ffe5075..ffdfe9c9a 100644 --- a/kubernetes/job/job.yaml +++ b/kubernetes/job/job.yaml @@ -36,7 +36,7 @@ spec: port: 10258 scheme: HTTPS initialDelaySeconds: 3 - periodSeconds: 3 + periodSeconds: 10 securityContext: allowPrivilegeEscalation: false capabilities: