charts icon indicating copy to clipboard operation
charts copied to clipboard

fix: render extraVolumes without extraVolumeMounts

Open immanuwell opened this issue 6 months ago • 0 comments

Description of the change

backstage.extraVolumes only rendered when backstage.extraVolumeMounts was also set on the main Backstage container. That breaks sidecar or initContainer setups that mount the extra volume without mounting it in the main container. This change renders extraVolumes on its own and adds a CI values case for a shared emptyDir volume.

Existing or Associated Issue(s)

Didnt find a matching issue or PR in backstage/charts.

Additional Information

Repro:

backstage:
  extraVolumes:
    - name: shared-cache
      emptyDir: {}
  extraContainers:
    - name: sidecar
      image: busybox:1.36
      command: ["sh", "-c", "sleep 3600"]
      volumeMounts:
        - name: shared-cache
          mountPath: /cache

Run helm template test charts/backstage -f values.yaml.

Before this change, the sidecar mount renders but spec.volumes misses shared-cache. After this change, the volume renders too.

Checklist

  • [x] Chart version bumped in Chart.yaml according to semver.
  • [x] Variables are documented in the values.yaml and added to the README.md. No value docs changed in this PR.
  • [x] JSON Schema generated. No schema changes were needed in this PR.
  • [ ] List tests pass for Chart using the Chart Testing tool and the ct lint command. ct is not installed locally. I ran helm lint and helm template for the default chart, ci/appConfig-values.yaml, ci/extraVolumes-values.yaml, and the new sidecar repro.

immanuwell avatar Jun 01 '26 05:06 immanuwell