Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshoot helpers for Helm release install/upgrade failures #5101

Closed
5 tasks done
stefanprodan opened this issue Dec 9, 2024 · 0 comments · Fixed by #5106
Closed
5 tasks done

Troubleshoot helpers for Helm release install/upgrade failures #5101

stefanprodan opened this issue Dec 9, 2024 · 0 comments · Fixed by #5106
Assignees
Labels
area/helm Helm related issues and pull requests area/ux In pursuit of a delightful user experience umbrella-issue Umbrella issue for tracking progress of a larger effort

Comments

@stefanprodan
Copy link
Member

stefanprodan commented Dec 9, 2024

To help users troubleshoot HelmRelease install and upgrade failures, we could add a new CLI command dedicated for debugging.

Specification

Introduce a new command called flux debug helmrelease that would help solve fluxcd/helm-controller#497

Debug values composition

The flux debug helmrelease <name> --show-values command could be used to print the final values by merging the HelmRelease inline values from .spec.values with the values coming from Kubernetes ConfigMaps/Secrets specified in .spec.valuesFrom. This command could help users debug failed releases by allowing them to export the final values from cluster into a local file. Using the final values, users can run locally helm template --values in-cluster-values.yaml and inspect the resulting resources.

Note that the exported values may contain sensitive information extracted from Kubernetes Secrets, this should be highlighted in the command help docs to make users aware of the implications of running this command on untrusted machines. Give that the Flux CLI uses the local kubeConfig, only users with read access to the secrets will be able to run the debug command.

Debug current status

The flux debug helmrelease <name> --show-status command can be used to print the release status along with the upgrade history, conditions and errors messages. This command could help users debug failed releases by inspecting the status sub-resource which contains rich informations about a HelmRelease compared to the flux get helmreleaase command which only displays the Ready condition message.

Implementation

  • Extract the values composition logic from helm-controller to a shared Go package under fluxcd/pkg/chartutil
  • Refactor helm-controller to make use of the shared package from fluxcd/pkg/chartutil
  • Implement flux debug helmreleaase --show-values using the shared package from fluxcd/pkg/chartutil
  • Implement flux debug helmreleaase --show-status
  • Document the command usage in the HelmRelease API docs.

PS. Refactoring the chartutil into a shared package is the first step towards flux build helmrelease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Helm related issues and pull requests area/ux In pursuit of a delightful user experience umbrella-issue Umbrella issue for tracking progress of a larger effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant