From f71f4cba698f2cb53fc816175b6021a6510eaf8e Mon Sep 17 00:00:00 2001 From: Daniel Fernandes Date: Thu, 19 Feb 2026 15:12:01 +0000 Subject: [PATCH] Add option to Values.yaml to set PV size --- helm/blueapi/README.md | 3 ++- helm/blueapi/templates/volumes.yaml | 2 +- helm/blueapi/values.schema.json | 4 ++++ helm/blueapi/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/helm/blueapi/README.md b/helm/blueapi/README.md index e4fe2c162..fed02cfd4 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":""}}` | Configure the initContainer that checks out the scratch configuration repositories | +| initContainer | object | `{"enabled":false,"persistentVolume":{"enabled":false,"existingClaimName":"","size":"1Gi"}}` | Configure the initContainer that checks out the scratch configuration repositories | | 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.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. | | nameOverride | string | `""` | | diff --git a/helm/blueapi/templates/volumes.yaml b/helm/blueapi/templates/volumes.yaml index a5d9e056f..9dd796888 100644 --- a/helm/blueapi/templates/volumes.yaml +++ b/helm/blueapi/templates/volumes.yaml @@ -11,5 +11,5 @@ spec: - ReadWriteMany resources: requests: - storage: 1Gi + storage: {{ .Values.initContainer.persistentVolume.size }} {{- end }} diff --git a/helm/blueapi/values.schema.json b/helm/blueapi/values.schema.json index 1578c0dad..e439f285d 100644 --- a/helm/blueapi/values.schema.json +++ b/helm/blueapi/values.schema.json @@ -122,6 +122,10 @@ "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", "type": "string" + }, + "size": { + "description": "Size of persistent volume", + "type": "string" } } } diff --git a/helm/blueapi/values.yaml b/helm/blueapi/values.yaml index ec6515921..6784f5847 100644 --- a/helm/blueapi/values.yaml +++ b/helm/blueapi/values.yaml @@ -218,6 +218,8 @@ initContainer: 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 existingClaimName: "" + # -- Size of persistent volume + size: "1Gi" debug: # -- If enabled, runs debugpy, allowing port-forwarding to expose port 5678 or attached vscode instance