Skip to content

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

Open
pierluigilenoci wants to merge 2 commits 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 2 commits intolitmuschaos:masterfrom
pierluigilenoci:fix/hook-secret-name-mismatch

Conversation

@pierluigilenoci
Copy link

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

… 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 d6b57cc to fc1648c Compare March 18, 2026 20:48
@pierluigilenoci
Copy link
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
Author

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

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

1 participant