fix(litmus-agent): fix hook secret name mismatch and subscriber subchart dependency#480
Open
pierluigilenoci wants to merge 2 commits intolitmuschaos:masterfrom
Open
Conversation
… in parent chart The parent chart (litmus-agent) was using helper templates defined in the subscriber subchart (subscriber.fullname, subscriber.labels). This caused two bugs: 1. Secret name mismatch: the hook secret was created with subscriber.fullname but referenced with litmus-agent.fullname in the pre-install job, resulting in different names. 2. When subscriber.enabled=false, the chart failed to render because the subscriber subchart helpers were not loaded. Replace all subscriber.* template references in parent chart templates with litmus-agent.* equivalents, and update the values.yaml comment. Fixes litmuschaos#418 Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
d6b57cc to
fc1648c
Compare
Author
|
@Jonsy13 @ispeakc0de this is ready for review. The fix replaces all Let me know if you'd like any changes! |
Author
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.
Summary
subscriber.*template helper references in parent chart templates withlitmus-agent.*equivalentssubscriber.fullname) and reference (litmus-agent.fullname)subscriber.enabled: falsevalues.yamlcomment to reference the correct helperProblem
The
litmus-agentparent chart was using helper templates defined in thesubscribersubchart:templates/secret.yamlsubscriber.fullnamelitmus-agent.fullnametemplates/infra-secret.yamlsubscriber.labelslitmus-agent.labelstemplates/infra-config-map.yamlsubscriber.labelslitmus-agent.labelstemplates/infra-config-map-workflow.yamlsubscriber.labelslitmus-agent.labelsThis caused:
<release>-subscriber-hookbut the pre-install job referenced<release>-litmus-agent-hooksubscriber.enabled: falsecausedhelm templateto fail because the subscriber subchart's_helpers.tplwas not loadedVerification
# Both pass after the fix: helm template test-release charts/litmus-agent helm template test-release charts/litmus-agent --set subscriber.enabled=falseCloses #418
Test plan
helm templatesucceeds with default valueshelm templatesucceeds withsubscriber.enabled=falsesecret.yamlandhook-pre-install-job.yaml