bb3ff98d53
This PS adds the ability to attach a release uuid to pods and rc objects as desired. A follow up ps will add the ability to add arbitary annotations to the same objects. Change-Id: Iceedba457a03387f6fc44eb763a00fd57f9d84a5 Signed-off-by: Pete Birley <pete@port.direct>
55 lines
2.0 KiB
YAML
55 lines
2.0 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 }}
|
|
annotations:
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
|
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 }}
|