Skip to content

Commit

Permalink
BC-7167 - add missing ConfigMap and concurrencyPolicy (#4959)
Browse files Browse the repository at this point in the history
* add dedicated ConfigMap for the moin.schule users deletion queueing CronJob

* add concurrencyPolicy: Forbid to the moin.schule integration CronJobs

* add EXIT_ON_ERROR: "true" to both of the moin.schule integration CronJobs
  • Loading branch information
bn-pass authored Apr 25, 2024
1 parent cef3efa commit 321f98b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ansible/roles/moin-schule-sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-deletion-queueing-cronjob.yml.j2

- name: unsynced moin.schule users deletion queueing CronJob ConfigMap
when: WITH_MOIN_SCHULE is defined and WITH_MOIN_SCHULE|bool == true and WITH_UNSYNCED_ENTITIES_DELETION is defined and WITH_UNSYNCED_ENTITIES_DELETION|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-deletion-queueing-cronjob-configmap.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ NAMESPACE }}
name: moin-schule-users-deletion-queueing-cronjob-configmap
labels:
app: moin-schule-users-deletion-queueing-cronjob
data:
NODE_OPTIONS: "--max-old-space-size=3072"
NEST_LOG_LEVEL: "info"
EXIT_ON_ERROR: "true"
SC_DOMAIN: "{{ DOMAIN }}"
FEATURE_PROMETHEUS_METRICS_ENABLED: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
name: moin-schule-users-deletion-queueing-cronjob
spec:
schedule: "{{ MOIN_SCHULE_USERS_DELETION_QUEUEING_CRONJOB_SCHEDULE|default("@hourly", true) }}"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
Expand All @@ -22,6 +23,8 @@ spec:
- name: moin-schule-users-deletion-queueing-cronjob
image: {{ SCHULCLOUD_SERVER_IMAGE }}:{{ SCHULCLOUD_SERVER_IMAGE_TAG }}
envFrom:
- configMapRef:
name: moin-schule-users-deletion-queueing-cronjob-configmap
- secretRef:
name: moin-schule-sync-secret
command: ['/bin/sh','-c']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ metadata:
data:
NODE_OPTIONS: "--max-old-space-size=3072"
NEST_LOG_LEVEL: "info"
EXIT_ON_ERROR: "true"
SC_DOMAIN: "{{ DOMAIN }}"
FEATURE_PROMETHEUS_METRICS_ENABLED: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
name: moin-schule-users-sync-cronjob
spec:
schedule: "{{ MOIN_SCHULE_USERS_SYNC_CRONJOB_SCHEDULE|default("@hourly", true) }}"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
Expand Down

0 comments on commit 321f98b

Please sign in to comment.