Move ceph-mon's checkPGs cron job to ceph-client
- Move the cronjob from ceph-mon to ceph-client - Adding ceph-rbd-pool job as dependencies for cronjob - checkPGs manifest set to true so it will always run in gate. Co-Authored-By: Chinasubbareddy Mallavarapu <cr3938@att.com>, Renis Makadia <renis.makadia@att.com> Change-Id: I9855d8d22265e78c7e2f5fa7ece69c9ff532ecb2
This commit is contained in:
parent
6a1a46a8ce
commit
65de349d58
@ -18,6 +18,6 @@ limitations under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
monPod=$(kubectl get pods --namespace=${DEPLOYMENT_NAMESPACE} --selector=application=ceph --selector=component=mon --output=jsonpath={.items[0].metadata.name} 2>/dev/null)
|
||||
mgrPod=$(kubectl get pods --namespace=${DEPLOYMENT_NAMESPACE} --selector=application=ceph --selector=component=mgr --output=jsonpath={.items[0].metadata.name} 2>/dev/null)
|
||||
|
||||
kubectl exec -t ${monPod} --namespace=${DEPLOYMENT_NAMESPACE} -- /tmp/utils-checkPGs.py All 2>/dev/null
|
||||
kubectl exec -t ${mgrPod} --namespace=${DEPLOYMENT_NAMESPACE} -- /tmp/utils-checkPGs.py All 2>/dev/null
|
@ -54,4 +54,10 @@ data:
|
||||
{{ tuple "bin/utils/_checkDNS.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
utils-checkDNS_start.sh: |
|
||||
{{ tuple "bin/utils/_checkDNS_start.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
||||
utils-checkPGs.py: |
|
||||
{{ tuple "bin/utils/_checkPGs.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
||||
utils-checkPGs.sh: |
|
||||
{{ tuple "bin/utils/_checkPGs.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
|
@ -73,7 +73,9 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
nodeSelector:
|
||||
{{ .Values.labels.mon.node_selector_key }}: {{ .Values.labels.mon.node_selector_value }}
|
||||
{{ .Values.labels.mgr.node_selector_key }}: {{ .Values.labels.mgr.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll "pool_checkpgs" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
|
||||
containers:
|
||||
- name: {{ $serviceAccountName }}
|
||||
{{ tuple $envAll "ceph_config_helper" | include "helm-toolkit.snippets.image" | indent 12 }}
|
||||
@ -85,15 +87,15 @@ spec:
|
||||
command:
|
||||
- /tmp/utils-checkPGs.sh
|
||||
volumeMounts:
|
||||
- name: ceph-mon-bin
|
||||
- name: ceph-client-bin
|
||||
mountPath: /tmp/utils-checkPGs.py
|
||||
subPath: utils-checkPGs.py
|
||||
readOnly: true
|
||||
- name: ceph-mon-bin
|
||||
- name: ceph-client-bin
|
||||
mountPath: /tmp/utils-checkPGs.sh
|
||||
subPath: utils-checkPGs.sh
|
||||
readOnly: true
|
||||
- name: ceph-mon-etc
|
||||
- name: ceph-client-etc
|
||||
mountPath: /etc/ceph/ceph.conf
|
||||
subPath: ceph.conf
|
||||
readOnly: true
|
||||
@ -116,13 +118,13 @@ spec:
|
||||
restartPolicy: Never
|
||||
hostNetwork: true
|
||||
volumes:
|
||||
- name: ceph-mon-bin
|
||||
- name: ceph-client-bin
|
||||
configMap:
|
||||
name: ceph-mon-bin
|
||||
name: ceph-client-bin
|
||||
defaultMode: 0555
|
||||
- name: ceph-mon-etc
|
||||
- name: ceph-client-etc
|
||||
configMap:
|
||||
name: ceph-mon-etc
|
||||
name: ceph-client-etc
|
||||
defaultMode: 0444
|
||||
- name: ceph-client-admin-keyring
|
||||
secret:
|
@ -157,6 +157,14 @@ spec:
|
||||
- name: pod-run
|
||||
mountPath: /run
|
||||
readOnly: false
|
||||
- name: ceph-client-bin
|
||||
mountPath: /tmp/utils-checkPGs.py
|
||||
subPath: utils-checkPGs.py
|
||||
readOnly: true
|
||||
- name: ceph-client-bin
|
||||
mountPath: /tmp/utils-checkPGs.sh
|
||||
subPath: utils-checkPGs.sh
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: pod-etc-ceph
|
||||
emptyDir: {}
|
||||
|
@ -122,6 +122,20 @@ network:
|
||||
public: 192.168.0.0/16
|
||||
cluster: 192.168.0.0/16
|
||||
|
||||
jobs:
|
||||
pool_checkPGs:
|
||||
# Execute every 15 minutes
|
||||
cron: "*/15 * * * *"
|
||||
history:
|
||||
# Number of successful job to keep
|
||||
successJob: 1
|
||||
# Number of failed job to keep
|
||||
failJob: 1
|
||||
concurrency:
|
||||
# Skip new job if previous job still active
|
||||
execPolicy: Forbid
|
||||
startingDeadlineSecs: 60
|
||||
|
||||
conf:
|
||||
features:
|
||||
mds: true
|
||||
@ -319,6 +333,12 @@ dependencies:
|
||||
services:
|
||||
- endpoint: internal
|
||||
service: ceph_mon
|
||||
pool_checkpgs:
|
||||
jobs:
|
||||
- ceph-rbd-pool
|
||||
services:
|
||||
- endpoint: internal
|
||||
service: ceph_mgr
|
||||
checkdns:
|
||||
services:
|
||||
- endpoint: internal
|
||||
@ -449,3 +469,4 @@ manifests:
|
||||
job_rbd_pool: true
|
||||
service_mgr: true
|
||||
pod_test: false
|
||||
cronjob_checkPGs: true
|
||||
|
@ -54,10 +54,6 @@ data:
|
||||
moncheck-reap-zombies.py: |
|
||||
{{ tuple "bin/moncheck/_reap-zombies.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
||||
utils-checkPGs.py: |
|
||||
{{ tuple "bin/utils/_checkPGs.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
utils-checkPGs.sh: |
|
||||
{{ tuple "bin/utils/_checkPGs.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
utils-checkObjectReplication.py: |
|
||||
{{ tuple "bin/utils/_checkObjectReplication.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
utils-checkDNS.sh: |
|
||||
|
@ -175,14 +175,6 @@ spec:
|
||||
mountPath: /tmp/mon-check.sh
|
||||
subPath: mon-check.sh
|
||||
readOnly: true
|
||||
- name: ceph-mon-bin
|
||||
mountPath: /tmp/utils-checkPGs.py
|
||||
subPath: utils-checkPGs.py
|
||||
readOnly: true
|
||||
- name: ceph-mon-bin
|
||||
mountPath: /tmp/utils-checkPGs.sh
|
||||
subPath: utils-checkPGs.sh
|
||||
readOnly: true
|
||||
- name: ceph-mon-bin
|
||||
mountPath: /tmp/checkObjectReplication.py
|
||||
subPath: utils-checkObjectReplication.py
|
||||
|
@ -105,20 +105,6 @@ network:
|
||||
public: 192.168.0.0/16
|
||||
cluster: 192.168.0.0/16
|
||||
|
||||
jobs:
|
||||
pool_checkPGs:
|
||||
# Execute every 15 minutes
|
||||
cron: "*/15 * * * *"
|
||||
history:
|
||||
# Number of successful job to keep
|
||||
successJob: 1
|
||||
# Number of failed job to keep
|
||||
failJob: 1
|
||||
concurrency:
|
||||
# Skip new job if previous job still active
|
||||
execPolicy: Forbid
|
||||
startingDeadlineSecs: 60
|
||||
|
||||
conf:
|
||||
templates:
|
||||
keyring:
|
||||
@ -298,4 +284,3 @@ manifests:
|
||||
service_mon: true
|
||||
service_mon_discovery: true
|
||||
job_storage_admin_keys: true
|
||||
cronjob_checkPGs: false
|
||||
|
@ -90,7 +90,6 @@ jobs:
|
||||
execPolicy: Forbid
|
||||
startingDeadlineSecs: 60
|
||||
manifests:
|
||||
cronjob_checkPGs: true
|
||||
cronjob_defragosds: true
|
||||
EOF
|
||||
|
||||
|
@ -185,7 +185,6 @@ jobs:
|
||||
execPolicy: Forbid
|
||||
startingDeadlineSecs: 60
|
||||
manifests:
|
||||
cronjob_checkPGs: true
|
||||
cronjob_defragosds: true
|
||||
job_bootstrap: false
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user