Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm: allow configuration of container liveness and readiness probes #4388

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/4388.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:feature
helm: add the ability to configure livenessProbe and readinesssProbe for consul-client daemonset.
```
8 changes: 8 additions & 0 deletions charts/consul/templates/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,14 @@ spec:
- containerPort: 8600
name: dns-udp
protocol: "UDP"
{{- with .Values.client.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 14 }}
{{- end }}
readinessProbe:
{{- if .Values.client.readinessProbe }}
{{- toYaml .Values.client.readinessProbe | nindent 14 }}
{{- else }}
# NOTE(mitchellh): when our HTTP status endpoints support the
# proper status codes, we should switch to that. This is temporary.
exec:
Expand All @@ -483,6 +490,7 @@ spec:
curl http://127.0.0.1:8500/v1/status/leader \
{{- end }}
2>/dev/null | grep -E '".+"'
{{- end }}
{{- if .Values.client.resources }}
resources:
{{- if eq (typeOf .Values.client.resources) "string" }}
Expand Down
20 changes: 20 additions & 0 deletions charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,26 @@ client:
# @type: string
updateStrategy: null

# Override the default livenessProbe and readinessProbe for the DaemonSet consul-client container.
# Refer to the Kubernetes documentation on how to [Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
#
# This should be a multi-line string
#
# Example:
#
# ```yaml
# readinessProbe:
# exec:
# command:
# - /bin/sh
# - -ec
# - "curl http://127.0.0.1:8500/v1/status/leader 2>/dev/null | grep -E '\".+\"' \n"
# ```
#
# @type: string
livenessProbe: {}
readinessProbe: {}

# Configuration for DNS configuration within the Kubernetes cluster.
# This creates a service that routes to all agents (client or server)
# for serving DNS requests. This DOES NOT automatically configure kube-dns
Expand Down
Loading