From 2f9b45138f387c8297623f9147d74c88039bfdfb Mon Sep 17 00:00:00 2001 From: lucas-phillips28 Date: Thu, 7 Nov 2024 10:24:21 +0000 Subject: [PATCH] Add perform edit cron job --- .../demo.yaml | 17 ++++++++++++++ .../pre-api-cron-perform-edit-requests.yaml | 22 +++++++++++++++++++ .../prod.yaml | 15 +++++++++++++ .../stg.yaml | 16 ++++++++++++++ .../test.yaml | 16 ++++++++++++++ apps/pre/prod/base/kustomization.yaml | 2 ++ apps/pre/stg/base/kustomization.yaml | 2 ++ apps/pre/test/base/kustomization.yaml | 2 ++ 8 files changed, 92 insertions(+) create mode 100644 apps/pre/pre-api-cron-perform-edit-requests/demo.yaml create mode 100644 apps/pre/pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml create mode 100644 apps/pre/pre-api-cron-perform-edit-requests/prod.yaml create mode 100644 apps/pre/pre-api-cron-perform-edit-requests/stg.yaml create mode 100644 apps/pre/pre-api-cron-perform-edit-requests/test.yaml diff --git a/apps/pre/pre-api-cron-perform-edit-requests/demo.yaml b/apps/pre/pre-api-cron-perform-edit-requests/demo.yaml new file mode 100644 index 00000000000..481e1c299db --- /dev/null +++ b/apps/pre/pre-api-cron-perform-edit-requests/demo.yaml @@ -0,0 +1,17 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: pre-api-cron-perform-edit-requests + namespace: pre +spec: + values: + global: + jobKind: CronJob + job: + suspend: true + schedule: "0 */5 * * * *" # every 5 mins + image: sdshmctspublic.azurecr.io/pre/api:prod-a52d16b-20241106102756 # {"$imagepolicy": "flux-system:pre-api"} + environment: + AZURE_SUBSCRIPTION_ID: c68a4bed-4c3d-4956-af51-4ae164c1957c + PLATFORM_ENV_TAG: Demo + MEDIA_SERVICE: MediaKind diff --git a/apps/pre/pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml b/apps/pre/pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml new file mode 100644 index 00000000000..a4ba6032b9c --- /dev/null +++ b/apps/pre/pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml @@ -0,0 +1,22 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: pre-api-cron-perform-edit-requests + namespace: pre +spec: + releaseName: pre-api-cron-perform-edit-requests + values: + java: + enabled: false + job: + enabled: true + environment: + TASK_NAME: PerformEditRequest + chart: + spec: + chart: ./stable/pre-api + sourceRef: + kind: GitRepository + name: hmcts-charts + namespace: flux-system + interval: 1m \ No newline at end of file diff --git a/apps/pre/pre-api-cron-perform-edit-requests/prod.yaml b/apps/pre/pre-api-cron-perform-edit-requests/prod.yaml new file mode 100644 index 00000000000..d125913f6a4 --- /dev/null +++ b/apps/pre/pre-api-cron-perform-edit-requests/prod.yaml @@ -0,0 +1,15 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: pre-api-cron-perform-edit-requests + namespace: pre +spec: + values: + global: + jobKind: CronJob + job: + suspend: true + schedule: "0 */5 * * * *" # every 5 mins + image: sdshmctspublic.azurecr.io/pre/api:prod-a52d16b-20241106102756 # {"$imagepolicy": "flux-system:pre-api"} + environment: + MEDIA_SERVICE: MediaKind diff --git a/apps/pre/pre-api-cron-perform-edit-requests/stg.yaml b/apps/pre/pre-api-cron-perform-edit-requests/stg.yaml new file mode 100644 index 00000000000..4f159405bd3 --- /dev/null +++ b/apps/pre/pre-api-cron-perform-edit-requests/stg.yaml @@ -0,0 +1,16 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: pre-api-cron-perform-edit-requests + namespace: pre +spec: + values: + global: + jobKind: CronJob + job: + schedule: "0 */5 * * * *" # every 5 mins + image: sdshmctspublic.azurecr.io/pre/api:prod-a52d16b-20241106102756 # {"$imagepolicy": "flux-system:pre-api"} + environment: + AZURE_SUBSCRIPTION_ID: 74dacd4f-a248-45bb-a2f0-af700dc4cf68 + PLATFORM_ENV_TAG: Staging + MEDIA_SERVICE: MediaKind diff --git a/apps/pre/pre-api-cron-perform-edit-requests/test.yaml b/apps/pre/pre-api-cron-perform-edit-requests/test.yaml new file mode 100644 index 00000000000..8c6a25b6c58 --- /dev/null +++ b/apps/pre/pre-api-cron-perform-edit-requests/test.yaml @@ -0,0 +1,16 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: pre-api-cron-perform-edit-requests + namespace: pre +spec: + values: + global: + jobKind: CronJob + job: + schedule: "0 */5 * * * *" # every 5 mins + image: sdshmctspublic.azurecr.io/pre/api:prod-a52d16b-20241106102756 # {"$imagepolicy": "flux-system:pre-api"} + environment: + AZURE_SUBSCRIPTION_ID: 3eec5bde-7feb-4566-bfb6-805df6e10b90 + PLATFORM_ENV_TAG: Test + MEDIA_SERVICE: MediaKind diff --git a/apps/pre/prod/base/kustomization.yaml b/apps/pre/prod/base/kustomization.yaml index b43e4d2f889..9ddacc86576 100644 --- a/apps/pre/prod/base/kustomization.yaml +++ b/apps/pre/prod/base/kustomization.yaml @@ -5,6 +5,7 @@ resources: - ../../pre-api-cron-cleanup-live-events/pre-api-cron-cleanup-live-events.yaml - ../../pre-api-cron-cleanup-streaming-locators/pre-api-cron-cleanup-streaming-locators.yaml - ../../pre-api-cron-close-pending-cases/pre-api-cron-close-pending-cases.yaml + - ../../pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml - ../../../base/slack-provider/prod namespace: pre patches: @@ -14,4 +15,5 @@ patches: - path: ../../pre-api-cron-cleanup-streaming-locators/prod.yaml - path: ../../pre-api-cron-cleanup-live-events/prod.yaml - path: ../../pre-api-cron-close-pending-cases/prod.yaml + - path: ../../pre-api-cron-perform-edit-requests/prod.yaml - path: ../../serviceaccount/prod.yaml diff --git a/apps/pre/stg/base/kustomization.yaml b/apps/pre/stg/base/kustomization.yaml index 1d8d5641942..ed013618dae 100644 --- a/apps/pre/stg/base/kustomization.yaml +++ b/apps/pre/stg/base/kustomization.yaml @@ -5,6 +5,7 @@ resources: - ../../pre-api-cron-cleanup-live-events/pre-api-cron-cleanup-live-events.yaml - ../../pre-api-cron-cleanup-streaming-locators/pre-api-cron-cleanup-streaming-locators.yaml - ../../pre-api-cron-close-pending-cases/pre-api-cron-close-pending-cases.yaml + - ../../pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml - ../../../rbac/nonprod-role.yaml - ../../../base/slack-provider/stg namespace: pre @@ -15,4 +16,5 @@ patches: - path: ../../pre-api-cron-cleanup-streaming-locators/stg.yaml - path: ../../pre-api-cron-cleanup-live-events/stg.yaml - path: ../../pre-api-cron-close-pending-cases/stg.yaml + - path: ../../pre-api-cron-perform-edit-requests/stg.yaml - path: ../../serviceaccount/stg.yaml diff --git a/apps/pre/test/base/kustomization.yaml b/apps/pre/test/base/kustomization.yaml index f5449ea7cce..fc71e7efff7 100644 --- a/apps/pre/test/base/kustomization.yaml +++ b/apps/pre/test/base/kustomization.yaml @@ -5,6 +5,7 @@ resources: - ../../pre-api-cron-cleanup-live-events/pre-api-cron-cleanup-live-events.yaml - ../../pre-api-cron-cleanup-streaming-locators/pre-api-cron-cleanup-streaming-locators.yaml - ../../pre-api-cron-close-pending-cases/pre-api-cron-close-pending-cases.yaml + - ../../pre-api-cron-perform-edit-requests/pre-api-cron-perform-edit-requests.yaml - ../../../rbac/nonprod-role.yaml - ../../../base/slack-provider/test namespace: pre @@ -15,4 +16,5 @@ patches: - path: ../../pre-api-cron-cleanup-streaming-locators/test.yaml - path: ../../pre-api-cron-cleanup-live-events/test.yaml - path: ../../pre-api-cron-close-pending-cases/test.yaml + - path: ../../pre-api-cron-perform-edit-requests/test.yaml - path: ../../serviceaccount/test.yaml