Skip to content

fix(litmus-agent): fix hook secret name mismatch and subscriber subchart dependency#480

Open
pierluigilenoci wants to merge 1 commit intolitmuschaos:masterfrom
pierluigilenoci:fix/hook-secret-name-mismatch
Open

fix(litmus-agent): fix hook secret name mismatch and subscriber subchart dependency#480
pierluigilenoci wants to merge 1 commit intolitmuschaos:masterfrom
pierluigilenoci:fix/hook-secret-name-mismatch

Conversation

@pierluigilenoci
Copy link
Copy Markdown

Summary

  • Replace all subscriber.* template helper references in parent chart templates with litmus-agent.* equivalents
  • Fix hook secret name mismatch between creation (subscriber.fullname) and reference (litmus-agent.fullname)
  • Fix chart rendering failure when subscriber.enabled: false
  • Update values.yaml comment to reference the correct helper

Problem

The litmus-agent parent chart was using helper templates defined in the subscriber subchart:

File Was using Now uses
templates/secret.yaml subscriber.fullname litmus-agent.fullname
templates/infra-secret.yaml subscriber.labels litmus-agent.labels
templates/infra-config-map.yaml subscriber.labels litmus-agent.labels
templates/infra-config-map-workflow.yaml subscriber.labels litmus-agent.labels

This caused:

  1. Secret name mismatch — the hook secret was created as <release>-subscriber-hook but the pre-install job referenced <release>-litmus-agent-hook
  2. Render failure — setting subscriber.enabled: false caused helm template to fail because the subscriber subchart's _helpers.tpl was not loaded

Verification

# Both pass after the fix:
helm template test-release charts/litmus-agent
helm template test-release charts/litmus-agent --set subscriber.enabled=false

Closes #418

Test plan

  • helm template succeeds with default values
  • helm template succeeds with subscriber.enabled=false
  • Hook secret name matches between secret.yaml and hook-pre-install-job.yaml

@pierluigilenoci
Copy link
Copy Markdown
Author

@Jonsy13 @ispeakc0de this is ready for review.

The fix replaces all subscriber.* helper references in the parent chart with litmus-agent.* equivalents (4 files). Verified with helm template in both subscriber.enabled=true and subscriber.enabled=false configurations.

Let me know if you'd like any changes!

@pierluigilenoci
Copy link
Copy Markdown
Author

@ksatchit @imrajdas @cnd4 could you please review this when you get a chance? Thanks!

@PriteshKiri
Copy link
Copy Markdown

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>
@pierluigilenoci pierluigilenoci force-pushed the fix/hook-secret-name-mismatch branch from 064b45f to b17afa2 Compare March 25, 2026 16:06
@pierluigilenoci
Copy link
Copy Markdown
Author

Done — rebased on latest master. Ready for review!

@pierluigilenoci
Copy link
Copy Markdown
Author

Hi @PriteshKiri — the branch is already up to date with the latest master (5d7f1ca). Let me know if there's anything else needed!

@PriteshKiri
Copy link
Copy Markdown

Thanks @pierluigilenoci

@ispeakc0de will be reviewing it shortly.

@pierluigilenoci
Copy link
Copy Markdown
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hook secret name mismatch + Helm dependencies issue

2 participants