fix(litmus-agent): fix hook secret name mismatch and subscriber subchart dependency#480
Conversation
d6b57cc to
fc1648c
Compare
|
@Jonsy13 @ispeakc0de this is ready for review. The fix replaces all Let me know if you'd like any changes! |
|
Hey @pierluigilenoci could you please update the base branch? |
… 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>
064b45f to
b17afa2
Compare
|
Done — rebased on latest master. Ready for review! |
|
Hi @PriteshKiri — the branch is already up to date with the latest master ( |
|
Thanks @pierluigilenoci @ispeakc0de will be reviewing it shortly. |
|
Hi @ispeakc0de — friendly follow-up on this. @PriteshKiri mentioned you'd be reviewing. The PR is rebased on latest master and CI (DCO) is green. Please let me know if you have any questions or need any changes. Thank you! |
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