-
Notifications
You must be signed in to change notification settings - Fork 8
feat(stacked-PR): create cluster with custom helm chart config #1023
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
Conversation
0563813 to
6d76d85
Compare
| cmNameFromVariables := helmChartConfig.ConfigMapRef.Name | ||
| clusterNamespace := cluster.Namespace | ||
| hcGetter := NewHelmChartGetterFromConfigMap(cmNameFromVariables, clusterNamespace, h.cl) | ||
| overrideHelmChart, err := hcGetter.getInfoFor(ctx, log, name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helmChartFromCustomConfigMap would be a better name IMO. I had to think about what "override" meant in this context
| overrideHelmChart, err := hcGetter.getInfoFor(ctx, log, name) | ||
| if err != nil { | ||
| if errors.As(err, &HelmChartInfoNotFoundError{}) { | ||
| // HelmChart is not defined in the custom configmap. Get the HelmChart from the default configmap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth logging a warn
437e52b to
ad5da85
Compare
|
we are going with different API design. Closing this PR. Thanks for the review @faiq |
What problem does this PR solve?:
default-helm-addons-configthat is shipped with CAREN.default-helm-addons-configconfigmapHow Has This Been Tested?:
[X] unit test for addon webhook
[]unit test for HelmChartGetter (will add new commit)
[]e2e tests with custom configmap (Will file stacked PR)
[X] manual test on Nutanix Cluster
Special notes for your reviewer:
The discussion for the API is still going on at #1015
While main logic would remain same, if any changes proposed in the API, I will update this PR with the implementation.
Open question:
Should we set owner reference in the referenced configmap?