From f2f93c33becf02ffa374bd843d6422c52942edd2 Mon Sep 17 00:00:00 2001 From: Amro Misbah Date: Tue, 27 Aug 2024 17:30:02 +0300 Subject: [PATCH] feat(oxauth-key-rotation): add schedule property --- .../gluu/charts/oxauth-key-rotation/templates/cronjobs.yaml | 4 ++++ pygluu/kubernetes/templates/helm/gluu/values.yaml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/oxauth-key-rotation/templates/cronjobs.yaml b/pygluu/kubernetes/templates/helm/gluu/charts/oxauth-key-rotation/templates/cronjobs.yaml index 57fa5cda..5a3c4446 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/oxauth-key-rotation/templates/cronjobs.yaml +++ b/pygluu/kubernetes/templates/helm/gluu/charts/oxauth-key-rotation/templates/cronjobs.yaml @@ -16,7 +16,11 @@ metadata: {{ toYaml .Values.additionalAnnotations | indent 4 }} {{- end }} spec: +{{- if ne .Values.cronJobSchedule "" }} + schedule: {{ .Values.cronJobSchedule | quote }} +{{- else }} schedule: "@every {{ .Values.keysLife }}h" +{{- end }} concurrencyPolicy: Forbid jobTemplate: spec: diff --git a/pygluu/kubernetes/templates/helm/gluu/values.yaml b/pygluu/kubernetes/templates/helm/gluu/values.yaml index c749693b..4ee653f6 100644 --- a/pygluu/kubernetes/templates/helm/gluu/values.yaml +++ b/pygluu/kubernetes/templates/helm/gluu/values.yaml @@ -2120,7 +2120,9 @@ oxauth-key-rotation: tag: 4.5.5-1 # -- Image Pull Secrets pullSecrets: [ ] - # -- Auth server key rotation keys life in hours + # -- Auth server key rotation job schedule + cronJobSchedule: "" + # -- Auth server key rotation keys life in hours. Used only if cronJobSchedule is not set. keysLife: 48 # -- Set key selection strategy used by Auth server keysStrategy: NEWER