Repository navigation
helm: keep multi-entry drivers chart resources separate - #652
Open
sarankumar1325 wants to merge 1 commit into
Open
sarankumar1325 wants to merge 1 commit into
sarankumar1325 wants to merge 1 commit into
Conversation
With more than one entry in cephConnections, clientProfiles or clientProfileReplications, the trailing "-}}" on the "if .name" line trimmed the newline before the "---" separator. The separator ended up glued to the last line of the previous entry, so every entry was rendered into one YAML document and only the last one was created. Stop trimming after the if action so "---" starts its own line again. Fixes: ceph#651 Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does
With two or more entries in
cephConnections,clientProfilesorclientProfileReplications, the ceph-csi-drivers chart rendered all of them into one YAML document, so only the last entry was created.The cause is the trailing
-}}on the{{- if $x.name -}}line. It trims the newline before---, which leaves the separator stuck to the last line of the previous entry (for examplename: conn-a---). This PR changes it to}}in the three templates, so---gets its own line again. Every other template in the chart already uses this form (storageclass.yaml,secret.yaml, ...).Rendered with two entries of each kind (
helm template t deploy/charts/ceph-csi-drivers -f values.yaml, then parsed with PyYAML):profile-b,conn-b,rep-b)profile-a,profile-b,conn-a,conn-b,rep-a,rep-b)Default values still render the same, and
helm lintpasses.Is there anything that requires special attention
It's a whitespace-only template change and backward compatible. Setups with a single entry render exactly as before (only a leading blank line changes).
Related issues
Fixes: #651
Future concerns
None.
Checklist:
guidelines in the developer
guide.
Request
notes
updated with breaking and/or notable changes for the next major release.
I made this change with help from an AI assistant. I reviewed it and checked the rendered output myself.