Skip to content

When mounting scratch area as a PVC, blueapi cannot support multiple instances in a namespace #1262

@DiamondJoseph

Description

@DiamondJoseph

Because the PV[C] (PersistentVolume[Claim]) that is created is named (pseudo-code) scratch-{version}, when multiple blueapis of the same version are in a namespace, they cannot each create unique PV[C]s, leaving one is left unable to start.

Recommended solution: Append the name of the Release (which is already enforced to be unique in the namespace) to the name of the Volume and where it is mounted:

name: scratch-{{ .Values.image.tag | default .Chart.AppVersion }}

claimName: {{default (tpl "scratch-{{ .Values.image.tag | default .Chart.AppVersion }}" .) .Values.initContainer.persistentVolume.existingClaimName }}

An example of this is found here- this uses the fullname helper method, which is defined for charts by default:

Alternatively, we could construct a unique name from fields of the the .Chart or .Release globals directly, as the fullname does.

The fullname helper is already used to define all other namespace resources,
e.g.:

name: {{ include "blueapi.fullname" . }}-config

name: {{ include "blueapi.fullname" . }}

Steps To Reproduce

Steps to reproduce the behavior:

  1. Check i15-beamline namespace in k8s-i15 cluster

Acceptance Criteria

  • When multiple blueapi instances are created with a scratch area in a PVC, they are all able to start

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions