Merge "ceph-mgr: change liveness/readiness probes"

This commit is contained in:
Zuul 2018-01-10 07:12:57 +00:00 committed by Gerrit Code Review
commit b17c051bfc
3 changed files with 44 additions and 12 deletions

@ -0,0 +1,14 @@
#!/bin/bash
set -ex
export LC_ALL=C
source variables_entrypoint.sh
IS_MGR_AVAIL=`ceph ${CLI_OPTS} mgr dump | python -c "import json, sys; print json.load(sys.stdin)['available']"`
if [ "${IS_MGR_AVAIL}" = True ]; then
exit 0
else
exit 1
fi

@ -63,6 +63,8 @@ data:
{{ tuple "bin/_start_rgw.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
start_mgr.sh: |+
{{ tuple "bin/_start_mgr.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
check_mgr.sh: |+
{{ tuple "bin/_check_mgr.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
init_rgw_ks.sh: |+
{{ tuple "bin/_init_rgw_ks.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
watch_mon_health.sh: |+

@ -73,23 +73,35 @@ spec:
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.mgr | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env:
- name: MGR_PORT
value: "{{ .Values.network.port.mgr }}"
{{- if .Values.ceph_mgr_enabled_modules }}
- name: ENABLED_MODULES
value: |-
{{- range $value := .Values.ceph_mgr_enabled_modules }}
{{ $value }}
{{- end }}
{{- end }}
{{- if .Values.ceph_mgr_modules_config }}
{{- range $module,$params := .Values.ceph_mgr_modules_config }}
{{- range $key, $value := $params }}
- name: {{ $module }}_{{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
command:
- /start_mgr.sh
ports:
- containerPort: {{ .Values.network.port.mgr }}
livenessProbe:
httpGet:
path: /
port: {{ .Values.network.port.mgr }}
initialDelaySeconds: 120
exec:
command:
- bash
- /check_mgr.sh
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: {{ .Values.network.port.mgr }}
timeoutSeconds: 5
exec:
command:
- bash
- /check_mgr.sh
volumeMounts:
- name: pod-etc-ceph
mountPath: /etc/ceph
@ -101,6 +113,10 @@ spec:
mountPath: /start_mgr.sh
subPath: start_mgr.sh
readOnly: true
- name: ceph-bin
mountPath: /check_mgr.sh
subPath: check_mgr.sh
readOnly: true
- name: ceph-bin
mountPath: /variables_entrypoint.sh
subPath: variables_entrypoint.sh