d6cfd78c4d
The checkPGs script is implemented to check the Object Storage Daemons (OSDs) in Placement Groups (PGs) of ceph pools to make sure OSDs were not allocated from the same failure domain. This script is intended to run from any one of the ceph-mon pods. Invoke the checkPGs script with --help to get the details on how to run it. A Kubernetes cron job is created to schedule the execution of this script at a regular interval. The execution frequency is defined in the ceph-mon/values.yaml file. Change-Id: I5d46bc824e88545cde1cc448ae714d7d3c243817
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
{{/*
|
|
Copyright 2018 The Openstack-Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.cronjob_checkPGs }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- $serviceAccountName := "ceph-pool-checkpgs" }}
|
|
{{ tuple $envAll "pool_checkpgs" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ $serviceAccountName }}
|
|
spec:
|
|
schedule: {{ .Values.jobs.pool_checkPGs.cron | quote }}
|
|
successfulJobsHistoryLimit: {{ .Values.jobs.pool_checkPGs.history.successJob }}
|
|
failedJobsHistoryLimit: {{ .Values.jobs.pool_checkPGs.history.failJob }}
|
|
concurrencyPolicy: {{ .Values.jobs.pool_checkPGs.concurrency.execPolicy }}
|
|
startingDeadlineSeconds: {{ .Values.jobs.pool_checkPGs.startingDeadlineSecs }}
|
|
jobTemplate:
|
|
metadata:
|
|
labels:
|
|
{{ tuple $envAll "ceph" "pool-checkpgs" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: {{ $serviceAccountName }}
|
|
{{ tuple $envAll "ceph_config_helper" | include "helm-toolkit.snippets.image" | indent 12 }}
|
|
env:
|
|
- name: DEPLOYMENT_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
command:
|
|
- /tmp/utils-checkPGs.sh
|
|
restartPolicy: Never
|
|
|
|
{{- end }}
|