kubernetes-sigs / cluster-api-addon-provider-helm

CAAPH uses Helm charts to manage the installation and lifecycle of Cluster API add-ons.
Apache License 2.0
113 stars 29 forks source link

Dry Run option #209

Open Uva-Vj opened 5 months ago

Uva-Vj commented 5 months ago

User Story

As a user I would like the option of dry run before installing helm charts through CAAPH to understand what exact changes will be made before the helmchartproxy is applied and k8s resources are created/updated.

Detailed Description

The dry run option should probably run helm template and kubectl diff the changes between the generated manifests and the actual resources running in all selected clusters and provide the diff output either in helmreleaseproxy or in a new CRD. This would help to get an idea of what exact changes will be made in which resources and clusters.

Anything else you would like to add:

I could add this as a step in a CI pipeline but the CI pipeline would have to interact with all workload clusters to run helm/kubectl commands against them to get the output which doesn't seem like an ideal scenario while using CAAPH to apply them through the management cluster.

/kind feature

Jont828 commented 2 months ago

@Uva-Vj I think we could add this feature if there's a sensible way to show the install changes/diff. I believe when you do --dry-run or helm template it will spit out a ton of YAML text, which isn't really feasible to show in the status or spec for the HelmReleaseProxy. I think a dry-run for the cluster selection would be pretty easy to add, and possibly to see if the chart would produce an error. Let me think on this one.