From 36d82a3760f16cc41eb53e6b52f393a27e678fdf Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 14:08:44 +0100 Subject: [PATCH 01/13] Remove old secrets --- .../overlays/prod/deployment.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/ra/approved-experiments/overlays/prod/deployment.yaml b/components/ra/approved-experiments/overlays/prod/deployment.yaml index a02db6de..de91de78 100644 --- a/components/ra/approved-experiments/overlays/prod/deployment.yaml +++ b/components/ra/approved-experiments/overlays/prod/deployment.yaml @@ -8,14 +8,3 @@ spec: containers: - name: approved-experiments image: ghcr.io/isisbusapps/approved-experiments:1.8.0 - env: - - name: CONFIG_PATH - value: /FBS/.env - volumeMounts: - - name: env-config - mountPath: "/FBS" - readOnly: true - volumes: - - name: env-config - secret: - secretName: approved-experiments-environment From 70999bcbdd1ff11d5259aac261c80cef9ccfce52 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 14:09:22 +0100 Subject: [PATCH 02/13] Remove new way of doing secrets from dev overlay as this can be kept in base now --- .../ra/approved-experiments/overlays/dev/deployment.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ra/approved-experiments/overlays/dev/deployment.yaml b/components/ra/approved-experiments/overlays/dev/deployment.yaml index 4343a85d..10855b77 100644 --- a/components/ra/approved-experiments/overlays/dev/deployment.yaml +++ b/components/ra/approved-experiments/overlays/dev/deployment.yaml @@ -8,6 +8,3 @@ spec: containers: - name: approved-experiments image: ghcr.io/isisbusapps/approved-experiments@sha256:9e63b784fd614f69cefa3a9ad3d261f460b8ffd6e1b5d912f09df5e96a37cf8d - envFrom: - - secretRef: - name: approved-experiments From ce23a318dd68d2cfb800586bf14b98c64d2ee76c Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 14:09:48 +0100 Subject: [PATCH 03/13] Add envfrom for vault secrets to base deployment --- components/ra/approved-experiments/base/deployment.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ra/approved-experiments/base/deployment.yaml b/components/ra/approved-experiments/base/deployment.yaml index 1def4c5e..079a2b41 100644 --- a/components/ra/approved-experiments/base/deployment.yaml +++ b/components/ra/approved-experiments/base/deployment.yaml @@ -22,6 +22,9 @@ spec: env: - name: FILTERS_PATH value: /app/filters.json + envFrom: + - secretRef: + name: approved-experiments volumeMounts: - name: common-views mountPath: "/app/build/common-views" From 3390f2aeac2d32046a4b8182e04e02a06a043296 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 14:15:04 +0100 Subject: [PATCH 04/13] Add static auth for prod --- .../overlays/prod/static-auth.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 components/ra/approved-experiments/overlays/prod/static-auth.yaml diff --git a/components/ra/approved-experiments/overlays/prod/static-auth.yaml b/components/ra/approved-experiments/overlays/prod/static-auth.yaml new file mode 100644 index 00000000..de1b86e8 --- /dev/null +++ b/components/ra/approved-experiments/overlays/prod/static-auth.yaml @@ -0,0 +1,16 @@ +apiVersion: secrets.hashicorp.com/v1beta1 +kind: VaultStaticSecret +metadata: + name: approved-experiments + namespace: apps +spec: + type: kv-v2 + refreshAfter: 30s + vaultAuthRef: static-auth + + mount: reviews_and_allocations + path: prod/approved-experiments + destination: + name: approved-experiments + overwrite: true + create: true From 702080c8364666c296d60db24b20034fe595f66a Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 18:16:07 +0100 Subject: [PATCH 05/13] Add to kustomization --- .../ra/approved-experiments/overlays/prod/kustomization.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/ra/approved-experiments/overlays/prod/kustomization.yaml b/components/ra/approved-experiments/overlays/prod/kustomization.yaml index 433e34ab..638c8b6d 100644 --- a/components/ra/approved-experiments/overlays/prod/kustomization.yaml +++ b/components/ra/approved-experiments/overlays/prod/kustomization.yaml @@ -3,6 +3,7 @@ kind: Kustomization resources: - ../../base + - static-secret.yaml namespace: apps From 94ddc7bb2e17cdbb6ac4fa0c97e5c082716abc45 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Wed, 17 Jun 2026 18:17:20 +0100 Subject: [PATCH 06/13] Rename static-auth to secret --- .../overlays/prod/{static-auth.yaml => static-secret.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/ra/approved-experiments/overlays/prod/{static-auth.yaml => static-secret.yaml} (100%) diff --git a/components/ra/approved-experiments/overlays/prod/static-auth.yaml b/components/ra/approved-experiments/overlays/prod/static-secret.yaml similarity index 100% rename from components/ra/approved-experiments/overlays/prod/static-auth.yaml rename to components/ra/approved-experiments/overlays/prod/static-secret.yaml From c3b261dbe39bc5bc0606ebae6b8d82c05bbea336 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Fri, 19 Jun 2026 11:55:35 +0100 Subject: [PATCH 07/13] Add kubernetes files to gitops for request consumables --- .../request-consumables/base/deployment.yaml | 57 +++++++++++++++++++ .../request-consumables/base/httproute.yaml | 19 +++++++ .../request-consumables/base/kustomize.yaml | 12 ++++ .../ra/request-consumables/base/service.yaml | 9 +++ .../overlays/dev/deployment.yaml | 0 .../overlays/dev/kustomization.yaml | 11 ++++ .../overlays/dev/static-secret.yaml | 16 ++++++ 7 files changed, 124 insertions(+) create mode 100644 components/ra/request-consumables/base/deployment.yaml create mode 100644 components/ra/request-consumables/base/httproute.yaml create mode 100644 components/ra/request-consumables/base/kustomize.yaml create mode 100644 components/ra/request-consumables/base/service.yaml create mode 100644 components/ra/request-consumables/overlays/dev/deployment.yaml create mode 100644 components/ra/request-consumables/overlays/dev/kustomization.yaml create mode 100644 components/ra/request-consumables/overlays/dev/static-secret.yaml diff --git a/components/ra/request-consumables/base/deployment.yaml b/components/ra/request-consumables/base/deployment.yaml new file mode 100644 index 00000000..5e76cc20 --- /dev/null +++ b/components/ra/request-consumables/base/deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: request-consumables +spec: + replicas: 1 + template: + metadata: + annotations: + co.elastic.logs/processors.add_fields.target: "" + co.elastic.logs/processors.add_fields.fields.application.name: "request-consumables" + co.elastic.logs/processors.add_fields.fields.application.domain: "request-consumables" + co.elastic.logs/processors.add_fields.fields.application.tier: "service" + co.elastic.logs/processors.add_fields.fields.application.language: "javascript" + co.elastic.logs/processors.dissect.tokenizer: "[%{?timestamp}] %{log_level} - %{log_message}" + co.elastic.logs/processors.dissect.target_prefix: "" + co.elastic.logs/multiline.pattern: "^\\[[0-9]{4}-[0-9]{2}-[0-9]{2}" + co.elastic.logs/multiline.negate: "true" + co.elastic.logs/multiline.match: "after" + + spec: + containers: + - name: request-consumables + imagePullPolicy: Always + ports: + - containerPort: 3000 + env: + - name: CONFIG_PATH + value: /FBS/.env + volumeMounts: + - name: env-config + mountPath: "/FBS" + readOnly: true + - name: common-views + mountPath: "/app/build/common-views" + readOnly: true + - name: common-js + mountPath: "/app/build/common-public/js" + readOnly: true + readinessProbe: + httpGet: + path: /consumables/health/ready + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 5 + imagePullSecrets: + - name: registry-creds + volumes: + - name: env-config + secret: + secretName: request-consumables-environment + - name: common-views + configMap: + name: common-pug-views + - name: common-js + configMap: + name: common-pug-content-js diff --git a/components/ra/request-consumables/base/httproute.yaml b/components/ra/request-consumables/base/httproute.yaml new file mode 100644 index 00000000..e3464844 --- /dev/null +++ b/components/ra/request-consumables/base/httproute.yaml @@ -0,0 +1,19 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: request-consumables +spec: + parentRefs: + - name: envoy-gateway + namespace: envoy-gateway-system + hostnames: + - "*.developers.facilities.rl.ac.uk" + - "*.facilities.rl.ac.uk" + rules: + - matches: + - path: + type: PathPrefix + value: /consumables + backendRefs: + - name: request-consumables + port: 3000 diff --git a/components/ra/request-consumables/base/kustomize.yaml b/components/ra/request-consumables/base/kustomize.yaml new file mode 100644 index 00000000..1dd73be8 --- /dev/null +++ b/components/ra/request-consumables/base/kustomize.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonLabels: + app: request-consumables + +namespace: apps + +resources: + - deployment.yaml + - httproute.yaml + - service.yaml diff --git a/components/ra/request-consumables/base/service.yaml b/components/ra/request-consumables/base/service.yaml new file mode 100644 index 00000000..c20f4e97 --- /dev/null +++ b/components/ra/request-consumables/base/service.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Service +metadata: + name: request-consumables +spec: + ports: + - protocol: TCP + port: 3000 + targetPort: 3000 diff --git a/components/ra/request-consumables/overlays/dev/deployment.yaml b/components/ra/request-consumables/overlays/dev/deployment.yaml new file mode 100644 index 00000000..e69de29b diff --git a/components/ra/request-consumables/overlays/dev/kustomization.yaml b/components/ra/request-consumables/overlays/dev/kustomization.yaml new file mode 100644 index 00000000..bb282b29 --- /dev/null +++ b/components/ra/request-consumables/overlays/dev/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ./../base + - static-secret.yaml + +namespace: apps + +patches: + - path: deployment.yaml \ No newline at end of file diff --git a/components/ra/request-consumables/overlays/dev/static-secret.yaml b/components/ra/request-consumables/overlays/dev/static-secret.yaml new file mode 100644 index 00000000..99ffa305 --- /dev/null +++ b/components/ra/request-consumables/overlays/dev/static-secret.yaml @@ -0,0 +1,16 @@ +apiVersion: secrets.hashicorp.com/v1beta1 +kind: VaultStaticSecret +metadata: + name: request-consumables + namespace: apps +spec: + type: kv-v2 + refreshAfter: 30s + vaultAuthRef: static-auth + + mount: reviews_and_allocations + path: dev/request-consumables + destination: + name: request-consumables + overwrite: true + create: true From 9c50bfbf09b1d1c8d697993218f94db3f94ab23f Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Fri, 19 Jun 2026 11:57:18 +0100 Subject: [PATCH 08/13] Add envfrom to dev deployment --- .../overlays/dev/deployment.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/ra/request-consumables/overlays/dev/deployment.yaml b/components/ra/request-consumables/overlays/dev/deployment.yaml index e69de29b..df008126 100644 --- a/components/ra/request-consumables/overlays/dev/deployment.yaml +++ b/components/ra/request-consumables/overlays/dev/deployment.yaml @@ -0,0 +1,17 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: request-consumables +spec: + template: + spec: + containers: + - name: request-consumables + image: ghcr.io/isisbusapps/request-consumables@sha256:3cfbda0bc1227f2e51fcdba61fc2dc86466cdf604159d9af908e66ca85883384 + env: + - name: NODE_ENV + value: development + envFrom: + - secretRef: + name: approved-experiments + \ No newline at end of file From 10c9aaa5c4ff78861ebc72bf5da28d35bf2d1034 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Fri, 19 Jun 2026 12:00:05 +0100 Subject: [PATCH 09/13] Accidental commits --- .../ra/approved-experiments/base/deployment.yaml | 3 --- .../approved-experiments/overlays/dev/deployment.yaml | 4 ++++ .../overlays/prod/deployment.yaml | 11 +++++++++++ .../request-consumables/overlays/dev/deployment.yaml | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/components/ra/approved-experiments/base/deployment.yaml b/components/ra/approved-experiments/base/deployment.yaml index 079a2b41..1def4c5e 100644 --- a/components/ra/approved-experiments/base/deployment.yaml +++ b/components/ra/approved-experiments/base/deployment.yaml @@ -22,9 +22,6 @@ spec: env: - name: FILTERS_PATH value: /app/filters.json - envFrom: - - secretRef: - name: approved-experiments volumeMounts: - name: common-views mountPath: "/app/build/common-views" diff --git a/components/ra/approved-experiments/overlays/dev/deployment.yaml b/components/ra/approved-experiments/overlays/dev/deployment.yaml index 10855b77..f0c0bd34 100644 --- a/components/ra/approved-experiments/overlays/dev/deployment.yaml +++ b/components/ra/approved-experiments/overlays/dev/deployment.yaml @@ -8,3 +8,7 @@ spec: containers: - name: approved-experiments image: ghcr.io/isisbusapps/approved-experiments@sha256:9e63b784fd614f69cefa3a9ad3d261f460b8ffd6e1b5d912f09df5e96a37cf8d + envFrom: + - secretRef: + name: approved-experiments + diff --git a/components/ra/approved-experiments/overlays/prod/deployment.yaml b/components/ra/approved-experiments/overlays/prod/deployment.yaml index de91de78..a02db6de 100644 --- a/components/ra/approved-experiments/overlays/prod/deployment.yaml +++ b/components/ra/approved-experiments/overlays/prod/deployment.yaml @@ -8,3 +8,14 @@ spec: containers: - name: approved-experiments image: ghcr.io/isisbusapps/approved-experiments:1.8.0 + env: + - name: CONFIG_PATH + value: /FBS/.env + volumeMounts: + - name: env-config + mountPath: "/FBS" + readOnly: true + volumes: + - name: env-config + secret: + secretName: approved-experiments-environment diff --git a/components/ra/request-consumables/overlays/dev/deployment.yaml b/components/ra/request-consumables/overlays/dev/deployment.yaml index df008126..35731279 100644 --- a/components/ra/request-consumables/overlays/dev/deployment.yaml +++ b/components/ra/request-consumables/overlays/dev/deployment.yaml @@ -13,5 +13,5 @@ spec: value: development envFrom: - secretRef: - name: approved-experiments + name: request-consumables \ No newline at end of file From ecc31a3314aaff0403a2f1146727773b706e2573 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Fri, 19 Jun 2026 12:01:28 +0100 Subject: [PATCH 10/13] Remove approved experiments commits from this branch --- .../overlays/dev/deployment.yaml | 2 +- .../overlays/prod/kustomization.yaml | 1 - .../overlays/prod/static-secret.yaml | 16 ---------------- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 components/ra/approved-experiments/overlays/prod/static-secret.yaml diff --git a/components/ra/approved-experiments/overlays/dev/deployment.yaml b/components/ra/approved-experiments/overlays/dev/deployment.yaml index f0c0bd34..b04db70f 100644 --- a/components/ra/approved-experiments/overlays/dev/deployment.yaml +++ b/components/ra/approved-experiments/overlays/dev/deployment.yaml @@ -11,4 +11,4 @@ spec: envFrom: - secretRef: name: approved-experiments - + \ No newline at end of file diff --git a/components/ra/approved-experiments/overlays/prod/kustomization.yaml b/components/ra/approved-experiments/overlays/prod/kustomization.yaml index 638c8b6d..433e34ab 100644 --- a/components/ra/approved-experiments/overlays/prod/kustomization.yaml +++ b/components/ra/approved-experiments/overlays/prod/kustomization.yaml @@ -3,7 +3,6 @@ kind: Kustomization resources: - ../../base - - static-secret.yaml namespace: apps diff --git a/components/ra/approved-experiments/overlays/prod/static-secret.yaml b/components/ra/approved-experiments/overlays/prod/static-secret.yaml deleted file mode 100644 index de1b86e8..00000000 --- a/components/ra/approved-experiments/overlays/prod/static-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: secrets.hashicorp.com/v1beta1 -kind: VaultStaticSecret -metadata: - name: approved-experiments - namespace: apps -spec: - type: kv-v2 - refreshAfter: 30s - vaultAuthRef: static-auth - - mount: reviews_and_allocations - path: prod/approved-experiments - destination: - name: approved-experiments - overwrite: true - create: true From 71e2ca6ebf5f87c678cd32824e1f99a26fe0ee3d Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Fri, 19 Jun 2026 12:02:12 +0100 Subject: [PATCH 11/13] Remove indentation --- components/ra/approved-experiments/overlays/dev/deployment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ra/approved-experiments/overlays/dev/deployment.yaml b/components/ra/approved-experiments/overlays/dev/deployment.yaml index b04db70f..4343a85d 100644 --- a/components/ra/approved-experiments/overlays/dev/deployment.yaml +++ b/components/ra/approved-experiments/overlays/dev/deployment.yaml @@ -11,4 +11,3 @@ spec: envFrom: - secretRef: name: approved-experiments - \ No newline at end of file From 4a87702eeb8276432ae22c0850d63fb275108590 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Mon, 22 Jun 2026 09:08:51 +0100 Subject: [PATCH 12/13] Fix kustomization file --- .../ra/request-consumables/overlays/dev/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ra/request-consumables/overlays/dev/kustomization.yaml b/components/ra/request-consumables/overlays/dev/kustomization.yaml index bb282b29..6365c013 100644 --- a/components/ra/request-consumables/overlays/dev/kustomization.yaml +++ b/components/ra/request-consumables/overlays/dev/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./../base + - ../../base - static-secret.yaml namespace: apps From a7157eb5c6d2c30734cb827d66411e871860f9f7 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Mon, 22 Jun 2026 09:10:59 +0100 Subject: [PATCH 13/13] Add deployment file --- argocd/dev/ra/request-consumables/app.yaml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 argocd/dev/ra/request-consumables/app.yaml diff --git a/argocd/dev/ra/request-consumables/app.yaml b/argocd/dev/ra/request-consumables/app.yaml new file mode 100644 index 00000000..7088e286 --- /dev/null +++ b/argocd/dev/ra/request-consumables/app.yaml @@ -0,0 +1,31 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: request-consumables + namespace: argocd +spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] + generators: + - clusters: + selector: + matchLabels: + appEnvironment: dev + ignoreApplicationDifferences: + - jsonPointers: + - /spec/syncPolicy + template: + metadata: + name: '{{.name}}-request-consumables' + spec: + project: r-a-project + source: + path: components/ra/request-consumables/overlays/dev + repoURL: 'https://github.com/isisbusapps/gitops' + targetRevision: main + destination: + namespace: apps + name: '{{.name}}' + syncPolicy: + automated: + selfHeal: true #https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/#automatic-self-healing \ No newline at end of file