Merge "Move ceph-mon's checkPGs cron job to ceph-client"
This commit is contained in:
commit
7a73f77957
@ -18,6 +18,6 @@ limitations under the License.
|
|||||||
|
|
||||||
set -ex
|
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 }}
|
{{ tuple "bin/utils/_checkDNS.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
utils-checkDNS_start.sh: |
|
utils-checkDNS_start.sh: |
|
||||||
{{ tuple "bin/utils/_checkDNS_start.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ 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 }}
|
{{- end }}
|
||||||
|
@ -73,7 +73,9 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
nodeSelector:
|
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:
|
containers:
|
||||||
- name: {{ $serviceAccountName }}
|
- name: {{ $serviceAccountName }}
|
||||||
{{ tuple $envAll "ceph_config_helper" | include "helm-toolkit.snippets.image" | indent 12 }}
|
{{ tuple $envAll "ceph_config_helper" | include "helm-toolkit.snippets.image" | indent 12 }}
|
||||||
@ -85,15 +87,15 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /tmp/utils-checkPGs.sh
|
- /tmp/utils-checkPGs.sh
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: ceph-mon-bin
|
- name: ceph-client-bin
|
||||||
mountPath: /tmp/utils-checkPGs.py
|
mountPath: /tmp/utils-checkPGs.py
|
||||||
subPath: utils-checkPGs.py
|
subPath: utils-checkPGs.py
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: ceph-mon-bin
|
- name: ceph-client-bin
|
||||||
mountPath: /tmp/utils-checkPGs.sh
|
mountPath: /tmp/utils-checkPGs.sh
|
||||||
subPath: utils-checkPGs.sh
|
subPath: utils-checkPGs.sh
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: ceph-mon-etc
|
- name: ceph-client-etc
|
||||||
mountPath: /etc/ceph/ceph.conf
|
mountPath: /etc/ceph/ceph.conf
|
||||||
subPath: ceph.conf
|
subPath: ceph.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
@ -116,13 +118,13 @@ spec:
|
|||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: ceph-mon-bin
|
- name: ceph-client-bin
|
||||||
configMap:
|
configMap:
|
||||||
name: ceph-mon-bin
|
name: ceph-client-bin
|
||||||
defaultMode: 0555
|
defaultMode: 0555
|
||||||
- name: ceph-mon-etc
|
- name: ceph-client-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: ceph-mon-etc
|
name: ceph-client-etc
|
||||||
defaultMode: 0444
|
defaultMode: 0444
|
||||||
- name: ceph-client-admin-keyring
|
- name: ceph-client-admin-keyring
|
||||||
secret:
|
secret:
|
@ -157,6 +157,14 @@ spec:
|
|||||||
- name: pod-run
|
- name: pod-run
|
||||||
mountPath: /run
|
mountPath: /run
|
||||||
readOnly: false
|
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:
|
volumes:
|
||||||
- name: pod-etc-ceph
|
- name: pod-etc-ceph
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
@ -122,6 +122,20 @@ network:
|
|||||||
public: 192.168.0.0/16
|
public: 192.168.0.0/16
|
||||||
cluster: 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:
|
conf:
|
||||||
features:
|
features:
|
||||||
mds: true
|
mds: true
|
||||||
@ -319,6 +333,12 @@ dependencies:
|
|||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
service: ceph_mon
|
service: ceph_mon
|
||||||
|
pool_checkpgs:
|
||||||
|
jobs:
|
||||||
|
- ceph-rbd-pool
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: ceph_mgr
|
||||||
checkdns:
|
checkdns:
|
||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
@ -449,3 +469,4 @@ manifests:
|
|||||||
job_rbd_pool: true
|
job_rbd_pool: true
|
||||||
service_mgr: true
|
service_mgr: true
|
||||||
pod_test: false
|
pod_test: false
|
||||||
|
cronjob_checkPGs: true
|
||||||
|
@ -54,10 +54,6 @@ data:
|
|||||||
moncheck-reap-zombies.py: |
|
moncheck-reap-zombies.py: |
|
||||||
{{ tuple "bin/moncheck/_reap-zombies.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ 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: |
|
utils-checkObjectReplication.py: |
|
||||||
{{ tuple "bin/utils/_checkObjectReplication.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ tuple "bin/utils/_checkObjectReplication.py.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
utils-checkDNS.sh: |
|
utils-checkDNS.sh: |
|
||||||
|
@ -175,14 +175,6 @@ spec:
|
|||||||
mountPath: /tmp/mon-check.sh
|
mountPath: /tmp/mon-check.sh
|
||||||
subPath: mon-check.sh
|
subPath: mon-check.sh
|
||||||
readOnly: true
|
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
|
- name: ceph-mon-bin
|
||||||
mountPath: /tmp/checkObjectReplication.py
|
mountPath: /tmp/checkObjectReplication.py
|
||||||
subPath: utils-checkObjectReplication.py
|
subPath: utils-checkObjectReplication.py
|
||||||
|
@ -105,20 +105,6 @@ network:
|
|||||||
public: 192.168.0.0/16
|
public: 192.168.0.0/16
|
||||||
cluster: 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:
|
conf:
|
||||||
templates:
|
templates:
|
||||||
keyring:
|
keyring:
|
||||||
@ -298,4 +284,3 @@ manifests:
|
|||||||
service_mon: true
|
service_mon: true
|
||||||
service_mon_discovery: true
|
service_mon_discovery: true
|
||||||
job_storage_admin_keys: true
|
job_storage_admin_keys: true
|
||||||
cronjob_checkPGs: false
|
|
||||||
|
@ -90,7 +90,6 @@ jobs:
|
|||||||
execPolicy: Forbid
|
execPolicy: Forbid
|
||||||
startingDeadlineSecs: 60
|
startingDeadlineSecs: 60
|
||||||
manifests:
|
manifests:
|
||||||
cronjob_checkPGs: true
|
|
||||||
cronjob_defragosds: true
|
cronjob_defragosds: true
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -185,7 +185,6 @@ jobs:
|
|||||||
execPolicy: Forbid
|
execPolicy: Forbid
|
||||||
startingDeadlineSecs: 60
|
startingDeadlineSecs: 60
|
||||||
manifests:
|
manifests:
|
||||||
cronjob_checkPGs: true
|
|
||||||
cronjob_defragosds: true
|
cronjob_defragosds: true
|
||||||
job_bootstrap: false
|
job_bootstrap: false
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user