diff --git a/hacks/values/kratos.yaml b/hacks/values/kratos.yaml index 80140d0351..a666243620 100644 --- a/hacks/values/kratos.yaml +++ b/hacks/values/kratos.yaml @@ -105,6 +105,31 @@ deployment: extraEnv: - name: FOO value: BAR + customLivenessProbe: + failureThreshold: 5 + exec: + command: + - /bin/sh + - -c + - |- + wget -S http://127.0.0.1:4434/admin/health/ready -O - + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + customReadinessProbe: + failureThreshold: 5 + exec: + command: + - /bin/sh + - -c + - |- + wget -S http://127.0.0.1:4434/admin/health/ready -O - + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + job: extraContainers: | diff --git a/helm/charts/kratos/templates/deployment-kratos.yaml b/helm/charts/kratos/templates/deployment-kratos.yaml index b286836c7c..ef9b82864f 100644 --- a/helm/charts/kratos/templates/deployment-kratos.yaml +++ b/helm/charts/kratos/templates/deployment-kratos.yaml @@ -188,15 +188,23 @@ spec: containerPort: {{ .Values.kratos.config.serve.public.port }} protocol: TCP livenessProbe: + {{- if .Values.deployment.customLivenessProbe }} + {{- toYaml .Values.deployment.customLivenessProbe | nindent 12 }} + {{- else }} httpGet: path: /admin/health/ready port: {{ .Values.kratos.config.serve.admin.port }} {{- toYaml .Values.deployment.livenessProbe | nindent 12 }} + {{- end }} readinessProbe: + {{- if .Values.deployment.customReadinessProbe }} + {{- toYaml .Values.deployment.customReadinessProbe | nindent 12 }} + {{- else }} httpGet: path: /admin/health/ready port: {{ .Values.kratos.config.serve.admin.port }} {{- toYaml .Values.deployment.readinessProbe | nindent 12 }} + {{- end }} resources: {{- toYaml $resources | nindent 12 }} {{- if .Values.securityContext }} diff --git a/helm/charts/kratos/values.yaml b/helm/charts/kratos/values.yaml index 9b9b91c04f..a0d444c62b 100644 --- a/helm/charts/kratos/values.yaml +++ b/helm/charts/kratos/values.yaml @@ -175,16 +175,22 @@ kratos: # -- Configuration options for the k8s deployment deployment: - # -- Configure the probes for when the deployment is considered ready and ongoing health check + # -- Configure the livenessProbe parameters livenessProbe: initialDelaySeconds: 30 periodSeconds: 10 failureThreshold: 5 + # -- Configure the readinessProbe parameters readinessProbe: initialDelaySeconds: 30 periodSeconds: 10 failureThreshold: 5 + # -- Configure a custom livenessProbe. This overwrites the default object + customLivenessProbe: {} + # -- Configure a custom readinessProbe. This overwrites the default object + customReadinessProbe: {} + # -- Array of extra arguments to be passed down to the deployment. Kubernetes args format is expected # - --foo # - --sqa-opt-out