Skip to content

Commit

Permalink
Implement livenessProbe variables and readinessProbe variables
Browse files Browse the repository at this point in the history
It's sometimes needed to configure certain timeouts. This PR makes all
the settings available as helm variables.
  • Loading branch information
stefanandres committed Nov 7, 2024
1 parent dbac911 commit 959aa1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions charts/kargo/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ spec:
- name: h2c
containerPort: 8080
protocol: TCP

{{- if .Values.api.probes.enabled }}
livenessProbe:
{{- with .Values.api.probes.livenessProbe }}
livenessProbe: {{- toYaml . | nindent 12 }}
{{- end }}
exec:
command:
- /usr/local/bin/grpc_health_probe
Expand All @@ -95,8 +98,9 @@ spec:
- -tls
- -tls-no-verify
{{- end }}
initialDelaySeconds: 10
readinessProbe:
{{- with .Values.api.probes.readinessProbe }}
readinessProbe: {{- toYaml . | nindent 12 }}
{{- end }}
exec:
command:
- /usr/local/bin/grpc_health_probe
Expand All @@ -105,7 +109,6 @@ spec:
- -tls
- -tls-no-verify
{{- end }}
initialDelaySeconds: 5
{{- end }}
{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.api.tls.enabled .Values.api.cabundle.configMapName .Values.api.cabundle.secretName }}
volumeMounts:
Expand Down
5 changes: 5 additions & 0 deletions charts/kargo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ api:
probes:
## @param api.probes.enabled Whether liveness and readiness probes should be included in the API server deployment. It is sometimes advantageous to disable these during local development.
enabled: true
livenessProbe:
initialDelaySeconds: 10

readinessProbe:
initialDelaySeconds: 5

tls:
## @param api.tls.enabled Whether to enable TLS directly on the API server. This is helpful if you do not intend to use an ingress controller or if you require TLS end-to-end. All other settings in this section will be ignored when this is set to `false`.
Expand Down

0 comments on commit 959aa1b

Please sign in to comment.