Skip to content

fix: render extraVolumes without extraVolumeMounts#334

Open
immanuwell wants to merge 1 commit into
backstage:mainfrom
immanuwell:fix/render-extra-volumes-for-sidecars
Open

fix: render extraVolumes without extraVolumeMounts#334
immanuwell wants to merge 1 commit into
backstage:mainfrom
immanuwell:fix/render-extra-volumes-for-sidecars

Conversation

@immanuwell

@immanuwell immanuwell commented Jun 1, 2026

Copy link
Copy Markdown

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

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the values.yaml and added to the README.md. No value docs changed in this PR.
  • 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 immanuwell requested a review from a team as a code owner June 1, 2026 05:07
Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell force-pushed the fix/render-extra-volumes-for-sidecars branch from 72a3301 to c07f1f1 Compare June 1, 2026 05:10
{{- end }}
volumes:
{{- if (or .Values.backstage.extraAppConfig (and .Values.backstage.extraVolumeMounts .Values.backstage.extraVolumes)) }}
{{- if (or .Values.backstage.extraAppConfig .Values.backstage.appConfig .Values.backstage.extraVolumes) }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @immanuwell , thanks for the PR! 🙂

Can you please tell me why this should now depend on .Values.backstage.appConfig ? I think that's a mistake.

It already has a separate mount point below:

{{- if .Values.backstage.appConfig }}
- name: backstage-app-config
configMap:
name: {{ include "common.names.fullname" . }}-app-config
{{- end }}

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

@github-actions github-actions Bot added the stale label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants