Parametrise etcd-anchor readiness probe

Change-Id: Iae3f1e5900c91b0ee7cb07c6f024cdcf41455125
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
This commit is contained in:
Anselme, Schubert (sa246v) 2023-08-22 12:35:37 -04:00
parent f806f8983a
commit 558acaf3bf
No known key found for this signature in database
GPG Key ID: 4E0F7ECFE90D344C
3 changed files with 16 additions and 8 deletions

View File

@ -15,4 +15,4 @@
apiVersion: v1
description: A chart for a DaemonSet-based etcd deployment.
name: etcd
version: 0.1.1
version: 0.1.2

View File

@ -14,8 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.daemonset_anchor }}
{{- $envAll := . }}
{{- define "etcdanchorreadinessProbeTemplate" }}
exec:
command:
- /tmp/bin/readiness
{{- end }}
{{- if .Values.manifests.daemonset_anchor }}
{{- $mounts_daemonset_anchor := .Values.pod.mounts.daemonset_anchor.daemonset_anchor }}
# Strip off "etcd" from service name to get the application name
# Note that application can either be kubernetes or calico for now
@ -103,12 +108,7 @@ spec:
value: https://$(POD_IP):{{ .Values.network.service_peer.target_port }}
- name: MANIFEST_PATH
value: /manifests/{{ .Values.service.name }}.yaml
readinessProbe:
exec:
command:
- /tmp/bin/readiness
initialDelaySeconds: 15
periodSeconds: 30
{{ dict "envAll" $envAll "component" "etcd-anchor" "container" "etcdctl" "type" "readiness" "probeTemplate" (include "etcdanchorreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
lifecycle:
preStop:
exec:

View File

@ -215,6 +215,14 @@ pod:
failureThreshold: 10
initialDelaySeconds: 5
periodSeconds: 30
etcd-anchor:
etcdctl:
readiness:
enabled: true
params:
failureThreshold: 10
initialDelaySeconds: 5
periodSeconds: 30
mounts:
daemonset_anchor:
daemonset_anchor: