CronJobs: Allow cronjob history to be controlled

This PS allows the number of jobs stored for cronjobs to be controlled.

Change-Id: I0187f566c4e4302f34aabb704696748756102d94
This commit is contained in:
portdirect 2018-02-08 13:13:04 -05:00
parent 85f1ff681b
commit 323267e256
5 changed files with 18 additions and 3 deletions

View File

@ -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:

View File

@ -51,6 +51,9 @@ images:
jobs:
volume_usage_audit:
cron: "*/5 * * * *"
history:
success: 3
failed: 1
pod:
user:

View File

@ -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:

View File

@ -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:

View File

@ -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: