diff --git a/charts/etcd/Chart.yaml b/charts/etcd/Chart.yaml index ba120505..7806da69 100644 --- a/charts/etcd/Chart.yaml +++ b/charts/etcd/Chart.yaml @@ -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 diff --git a/charts/etcd/templates/daemonset-anchor.yaml b/charts/etcd/templates/daemonset-anchor.yaml index bc832016..25ab8801 100644 --- a/charts/etcd/templates/daemonset-anchor.yaml +++ b/charts/etcd/templates/daemonset-anchor.yaml @@ -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: diff --git a/charts/etcd/values.yaml b/charts/etcd/values.yaml index ae7b6a17..98f7b3a2 100644 --- a/charts/etcd/values.yaml +++ b/charts/etcd/values.yaml @@ -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: