From bccb7a9055dc0883c7f6d1506fa7d5f106d6c357 Mon Sep 17 00:00:00 2001 From: Daniel Fernandes Date: Wed, 1 Jul 2026 08:47:27 +0000 Subject: [PATCH 1/4] Add PVC customName --- helm/blueapi/templates/statefulset.yaml | 2 ++ helm/blueapi/templates/volumes.yaml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/helm/blueapi/templates/statefulset.yaml b/helm/blueapi/templates/statefulset.yaml index 556089965e..adf4e4e90b 100644 --- a/helm/blueapi/templates/statefulset.yaml +++ b/helm/blueapi/templates/statefulset.yaml @@ -62,6 +62,8 @@ spec: persistentVolumeClaim: {{- if .Values.initContainer.persistentVolume.existingClaimName }} claimName: {{ .Values.initContainer.persistentVolume.existingClaimName }} + {{- else if .Values.initContainer.persistentVolume.customName }} + claimName: {{ include "blueapi.fullname" . }}-scratchr{{ .Values.initContainer.persistentVolume.customName }}-{{ .Values.image.tag | default .Chart.AppVersion }} {{- else }} claimName: {{ include "blueapi.fullname" . }}-scratch-{{ .Values.image.tag | default .Chart.AppVersion }} {{- end }} diff --git a/helm/blueapi/templates/volumes.yaml b/helm/blueapi/templates/volumes.yaml index 9dd796888b..92b855f73c 100644 --- a/helm/blueapi/templates/volumes.yaml +++ b/helm/blueapi/templates/volumes.yaml @@ -2,7 +2,11 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: + {{- if .Values.initContainer.persistentVolume.customName }} + name: {{ include "blueapi.fullname" . }}-scratch-{{ .Values.initContainer.persistentVolume.customName }}-{{ .Values.image.tag | default .Chart.AppVersion }} + {{- else }} name: {{ include "blueapi.fullname" . }}-scratch-{{ .Values.image.tag | default .Chart.AppVersion }} + {{- end }} annotations: argocd.argoproj.io/sync-options: Prune=false,Delete=false argocd.argoproj.io/compare-options: IgnoreExtraneous From e0576cdac10fc41594537c321dd4e420fe8ebf46 Mon Sep 17 00:00:00 2001 From: Daniel Fernandes Date: Wed, 1 Jul 2026 08:49:37 +0000 Subject: [PATCH 2/4] Add customName to valueslyaml --- helm/blueapi/README.md | 5 +++-- helm/blueapi/values.schema.json | 6 +++++- helm/blueapi/values.yaml | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/helm/blueapi/README.md b/helm/blueapi/README.md index 4ece387b72..7361fce82a 100644 --- a/helm/blueapi/README.md +++ b/helm/blueapi/README.md @@ -21,9 +21,10 @@ A Helm chart deploying a worker pod that runs Bluesky plans | imagePullSecrets | list | `[]` | | | ingress | object | `{"annotations":{},"className":"nginx","enabled":false,"hosts":[{"host":"example.diamond.ac.uk","paths":[{"path":"/","pathType":"Prefix"}]}],"tls":[]}` | Configuring and enabling an ingress allows blueapi to be served at a nicer address, e.g. ixx-blueapi.diamond.ac.uk | | ingress.hosts[0] | object | `{"host":"example.diamond.ac.uk","paths":[{"path":"/","pathType":"Prefix"}]}` | Request a host from https://jira.diamond.ac.uk/servicedesk/customer/portal/2/create/91 of the form ixx-blueapi.diamond.ac.uk. Note: pathType: Prefix is required in Diamond's clusters | -| initContainer | object | `{"enabled":false,"persistentVolume":{"enabled":false,"existingClaimName":"","size":"1Gi"}}` | Configure the initContainer that checks out the scratch configuration repositories | +| initContainer | object | `{"enabled":false,"persistentVolume":{"customName":"","enabled":false,"existingClaimName":"","size":"1Gi"}}` | Configure the initContainer that checks out the scratch configuration repositories | +| initContainer.persistentVolume.customName | string | `""` | May be set to create or use a PVC named `ixx-blueapi-scratch-{customName}-a.b.c` | | initContainer.persistentVolume.enabled | bool | `false` | Whether to use a persistent volume in the cluster or check out onto the mounted host filesystem If persistentVolume.enabled: False, mounts scratch.root as scratch.root in the container | -| initContainer.persistentVolume.existingClaimName | string | `""` | May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release | +| initContainer.persistentVolume.existingClaimName | string | `""` | Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release | | initContainer.persistentVolume.size | string | `"1Gi"` | Size of persistent volume | | initResources | object | `{}` | Override resources for init container. By default copies resources of main container. | | livenessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/healthz","port":"http"},"periodSeconds":10}` | Liveness probe, if configured kubernetes will kill the pod and start a new one if failed consecutively. This is automatically disabled when in debug mode. | diff --git a/helm/blueapi/values.schema.json b/helm/blueapi/values.schema.json index 20bdf376da..c1f567bfb4 100644 --- a/helm/blueapi/values.schema.json +++ b/helm/blueapi/values.schema.json @@ -115,12 +115,16 @@ "persistentVolume": { "type": "object", "properties": { + "customName": { + "description": "May be set to create or use a PVC named `ixx-blueapi-scratch-{customName}-a.b.c`", + "type": "string" + }, "enabled": { "description": "Whether to use a persistent volume in the cluster or check out onto the mounted host filesystem If persistentVolume.enabled: False, mounts scratch.root as scratch.root in the container", "type": "boolean" }, "existingClaimName": { - "description": "May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release", + "description": "Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release", "type": "string" }, "size": { diff --git a/helm/blueapi/values.yaml b/helm/blueapi/values.yaml index 36a82eeb5d..829f45cf34 100644 --- a/helm/blueapi/values.yaml +++ b/helm/blueapi/values.yaml @@ -223,8 +223,10 @@ initContainer: # -- Whether to use a persistent volume in the cluster or check out onto the mounted host filesystem # If persistentVolume.enabled: False, mounts scratch.root as scratch.root in the container enabled: false - # -- May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release + # -- Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release existingClaimName: "" + # -- May be set to create or use a PVC named `ixx-blueapi-scratch-{customName}-a.b.c` + customName: "" # -- Size of persistent volume size: "1Gi" From 63179816c37c05a1034d923a50cbc336fad8e58d Mon Sep 17 00:00:00 2001 From: Daniel Fernandes <65790536+dan-fernandes@users.noreply.github.com> Date: Fri, 7 Aug 2026 10:08:54 +0100 Subject: [PATCH 3/4] Update statefulset.yaml --- helm/blueapi/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/blueapi/templates/statefulset.yaml b/helm/blueapi/templates/statefulset.yaml index adf4e4e90b..4df8bcaa12 100644 --- a/helm/blueapi/templates/statefulset.yaml +++ b/helm/blueapi/templates/statefulset.yaml @@ -63,7 +63,7 @@ spec: {{- if .Values.initContainer.persistentVolume.existingClaimName }} claimName: {{ .Values.initContainer.persistentVolume.existingClaimName }} {{- else if .Values.initContainer.persistentVolume.customName }} - claimName: {{ include "blueapi.fullname" . }}-scratchr{{ .Values.initContainer.persistentVolume.customName }}-{{ .Values.image.tag | default .Chart.AppVersion }} + claimName: {{ include "blueapi.fullname" . }}-scratch-{{ .Values.initContainer.persistentVolume.customName }}-{{ .Values.image.tag | default .Chart.AppVersion }} {{- else }} claimName: {{ include "blueapi.fullname" . }}-scratch-{{ .Values.image.tag | default .Chart.AppVersion }} {{- end }} From 880f1d83e8691393d4740e2110aedccf9df10855 Mon Sep 17 00:00:00 2001 From: Daniel Fernandes Date: Fri, 7 Aug 2026 10:22:29 +0000 Subject: [PATCH 4/4] Replace deprecation description --- helm/blueapi/README.md | 2 +- helm/blueapi/values.schema.json | 2 +- helm/blueapi/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/blueapi/README.md b/helm/blueapi/README.md index 7361fce82a..8e347d5947 100644 --- a/helm/blueapi/README.md +++ b/helm/blueapi/README.md @@ -24,7 +24,7 @@ A Helm chart deploying a worker pod that runs Bluesky plans | initContainer | object | `{"enabled":false,"persistentVolume":{"customName":"","enabled":false,"existingClaimName":"","size":"1Gi"}}` | Configure the initContainer that checks out the scratch configuration repositories | | initContainer.persistentVolume.customName | string | `""` | May be set to create or use a PVC named `ixx-blueapi-scratch-{customName}-a.b.c` | | initContainer.persistentVolume.enabled | bool | `false` | Whether to use a persistent volume in the cluster or check out onto the mounted host filesystem If persistentVolume.enabled: False, mounts scratch.root as scratch.root in the container | -| initContainer.persistentVolume.existingClaimName | string | `""` | Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release | +| initContainer.persistentVolume.existingClaimName | string | `""` | Deprecated. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release | | initContainer.persistentVolume.size | string | `"1Gi"` | Size of persistent volume | | initResources | object | `{}` | Override resources for init container. By default copies resources of main container. | | livenessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/healthz","port":"http"},"periodSeconds":10}` | Liveness probe, if configured kubernetes will kill the pod and start a new one if failed consecutively. This is automatically disabled when in debug mode. | diff --git a/helm/blueapi/values.schema.json b/helm/blueapi/values.schema.json index 1b40a6082a..51b89beadb 100644 --- a/helm/blueapi/values.schema.json +++ b/helm/blueapi/values.schema.json @@ -124,7 +124,7 @@ "type": "boolean" }, "existingClaimName": { - "description": "Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release", + "description": "Deprecated. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release", "type": "string" }, "size": { diff --git a/helm/blueapi/values.yaml b/helm/blueapi/values.yaml index 829f45cf34..941575fb91 100644 --- a/helm/blueapi/values.yaml +++ b/helm/blueapi/values.yaml @@ -223,7 +223,7 @@ initContainer: # -- Whether to use a persistent volume in the cluster or check out onto the mounted host filesystem # If persistentVolume.enabled: False, mounts scratch.root as scratch.root in the container enabled: false - # -- Will be deleted in Blueapi 2.0. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release + # -- Deprecated. May be set to an existing persistent volume claim to re-use the volume, else a new one is created for each blueapi release existingClaimName: "" # -- May be set to create or use a PVC named `ixx-blueapi-scratch-{customName}-a.b.c` customName: ""