diff --git a/cinder/templates/cron-job-cinder-volume-usage-audit.yaml b/cinder/templates/cron-job-cinder-volume-usage-audit.yaml index 5aab6e438c..4c6c57db40 100644 --- a/cinder/templates/cron-job-cinder-volume-usage-audit.yaml +++ b/cinder/templates/cron-job-cinder-volume-usage-audit.yaml @@ -25,12 +25,14 @@ limitations under the License. {{- $serviceAccountName := "cinder-volume-usage-audit" }} {{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- -apiVersion: batch/v2alpha1 +apiVersion: batch/v1beta1 kind: CronJob metadata: name: cinder-volume-usage-audit spec: schedule: {{ .Values.jobs.volume_usage_audit.cron | quote }} + successfulJobsHistoryLimit: {{ .Values.jobs.volume_usage_audit.history.success }} + failedJobsHistoryLimit: {{ .Values.jobs.volume_usage_audit.history.failed }} concurrencyPolicy: Forbid jobTemplate: metadata: diff --git a/cinder/values.yaml b/cinder/values.yaml index e2a525ce60..4d0cb7995a 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -51,6 +51,9 @@ images: jobs: volume_usage_audit: cron: "*/5 * * * *" + history: + success: 3 + failed: 1 pod: user: diff --git a/keystone/templates/cron-job-credential-rotate.yaml b/keystone/templates/cron-job-credential-rotate.yaml index 91aeb0892c..3f694f45fc 100644 --- a/keystone/templates/cron-job-credential-rotate.yaml +++ b/keystone/templates/cron-job-credential-rotate.yaml @@ -53,12 +53,14 @@ subjects: name: {{ $serviceAccountName }} namespace: {{ $envAll.Release.Namespace }} --- -apiVersion: batch/v2alpha1 +apiVersion: batch/v1beta1 kind: CronJob metadata: name: keystone-credential-rotate spec: schedule: {{ .Values.jobs.credential_rotate.cron | quote }} + successfulJobsHistoryLimit: {{ .Values.jobs.credential_rotate.history.success }} + failedJobsHistoryLimit: {{ .Values.jobs.credential_rotate.history.failed }} concurrencyPolicy: Forbid jobTemplate: metadata: diff --git a/keystone/templates/cron-job-fernet-rotate.yaml b/keystone/templates/cron-job-fernet-rotate.yaml index 55e2382e1e..d555b55fff 100644 --- a/keystone/templates/cron-job-fernet-rotate.yaml +++ b/keystone/templates/cron-job-fernet-rotate.yaml @@ -53,12 +53,14 @@ subjects: name: {{ $serviceAccountName }} namespace: {{ $envAll.Release.Namespace }} --- -apiVersion: batch/v2alpha1 +apiVersion: batch/v1beta1 kind: CronJob metadata: name: keystone-fernet-rotate spec: schedule: {{ .Values.jobs.fernet_rotate.cron | quote }} + successfulJobsHistoryLimit: {{ .Values.jobs.fernet_rotate.history.success }} + failedJobsHistoryLimit: {{ .Values.jobs.fernet_rotate.history.failed }} concurrencyPolicy: Forbid jobTemplate: metadata: diff --git a/keystone/values.yaml b/keystone/values.yaml index c3befea836..508c2425eb 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -247,6 +247,9 @@ jobs: cron: "0 0 * * 0" user: keystone group: keystone + history: + success: 3 + failed: 1 credential_setup: user: keystone group: keystone @@ -256,6 +259,9 @@ jobs: migrate_wait: 120 user: keystone group: keystone + history: + success: 3 + failed: 1 conf: keystone: