Enable probes config for etcd
This commit enables configuration of probes for etcd pod by manipulating/overriding values in values.yaml or through manifests. Change-Id: I69eabd13f8ea8b97a33281ad993ec2e88b9280bc
This commit is contained in:
parent
4735ecfd7f
commit
490dd63c2c
@ -15,6 +15,26 @@
|
|||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
|
{{- define "etcdreadinessProbeTemplate" }}
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |-
|
||||||
|
export ETCDCTL_ENDPOINTS=https://$POD_IP:{{ .Values.network.service_client.target_port }}
|
||||||
|
etcdctl endpoint health
|
||||||
|
exit $?
|
||||||
|
{{- end }}
|
||||||
|
{{- define "etcdlivenessProbeTemplate" }}
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |-
|
||||||
|
export ETCDCTL_ENDPOINTS=https://$POD_IP:{{ .Values.network.service_client.target_port }}
|
||||||
|
etcdctl endpoint status
|
||||||
|
exit $?
|
||||||
|
{{- end }}
|
||||||
# Strip off "etcd" from service name to get the application name
|
# Strip off "etcd" from service name to get the application name
|
||||||
# Note that application can either be kubernetes or calico for now
|
# Note that application can either be kubernetes or calico for now
|
||||||
# and may expand in scope in the future
|
# and may expand in scope in the future
|
||||||
@ -101,6 +121,8 @@ spec:
|
|||||||
value: https://$(POD_IP):{{ .Values.network.service_peer.target_port }}
|
value: https://$(POD_IP):{{ .Values.network.service_peer.target_port }}
|
||||||
- name: MANIFEST_PATH
|
- name: MANIFEST_PATH
|
||||||
value: /manifests/{{ .Values.service.name }}.yaml
|
value: /manifests/{{ .Values.service.name }}.yaml
|
||||||
|
{{ dict "envAll" $envAll "component" "etcd" "container" "etcd" "type" "readiness" "probeTemplate" (include "etcdreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 6 }}
|
||||||
|
{{ dict "envAll" $envAll "component" "etcd" "container" "etcd" "type" "liveness" "probeTemplate" (include "etcdlivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 6 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /var/lib/etcd
|
mountPath: /var/lib/etcd
|
||||||
|
@ -114,6 +114,22 @@ pod:
|
|||||||
etcd:
|
etcd:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
readOnlyRootFilesystem: false
|
readOnlyRootFilesystem: false
|
||||||
|
probes:
|
||||||
|
etcd:
|
||||||
|
etcd:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
failureThreshold: 10
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 3
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
failureThreshold: 10
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 30
|
||||||
mounts:
|
mounts:
|
||||||
daemonset_anchor:
|
daemonset_anchor:
|
||||||
daemonset_anchor:
|
daemonset_anchor:
|
||||||
|
@ -112,7 +112,7 @@ data:
|
|||||||
type: git
|
type: git
|
||||||
location: https://opendev.org/openstack/openstack-helm-infra.git
|
location: https://opendev.org/openstack/openstack-helm-infra.git
|
||||||
subpath: helm-toolkit
|
subpath: helm-toolkit
|
||||||
reference: d6996b8004db35acad7d51412b0b3216189e745f
|
reference: b7e2d6839ce600a7c1e2103f55d208ad3f5029ca
|
||||||
dependencies: []
|
dependencies: []
|
||||||
---
|
---
|
||||||
schema: armada/Chart/v1
|
schema: armada/Chart/v1
|
||||||
|
@ -20,7 +20,7 @@ HELM=${1}
|
|||||||
HELM_PIDFILE=${2}
|
HELM_PIDFILE=${2}
|
||||||
SERVE_DIR=$(mktemp -d)
|
SERVE_DIR=$(mktemp -d)
|
||||||
|
|
||||||
HTK_STABLE_COMMIT=${HTK_COMMIT:-"200b5e902b3a176fbfbe669b6a10a254c9b50f5d"}
|
HTK_STABLE_COMMIT=${HTK_COMMIT:-"b7e2d6839ce600a7c1e2103f55d208ad3f5029ca"}
|
||||||
|
|
||||||
${HELM} init --client-only
|
${HELM} init --client-only
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user