Closed willie-yao closed 2 months ago
Name | Link |
---|---|
Latest commit | d1112d3aa72527cdf031bf254aeebfef4f8e38bc |
Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-cluster-api-operator/deploys/667df1d13ef2ce0008206184 |
Deploy Preview | https://deploy-preview-538--kubernetes-sigs-cluster-api-operator.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I'm a bit confused on how to add a conversion function for CRDPattern. @Fedosin @alexander-demicev is there an example on how to do this? I tried adding something like this to the conversion funcs which didn't seem to work: https://github.com/willie-yao/cluster-api-operator/blob/upstream-install-aso-crds/api/v1alpha1/provider_conversion.go#L48
@willie-yao You can find an example here https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/4228/files, this PR added a new field to API and conversion to older versions
Thanks @alexander-demicev! I fixed up the conversion and added a unit test!
@willie-yao This change is too specific to capz. What do you think about making it more generic? Can we introduce a new field to customize additional deployments that come with providers? I think something like AdditionalDeployments
might work, where we can store the deployment names to customize and DeploymentSpec
structure to apply these customizations. Do you think it makes sense?
I can see that in the future there might be more providers like CAPZ with more than one Deployment so it might be better to try to fix the problem in a bigger scope.
@alexander-demicev That is a great idea. I did notice that this may be too specific to CAPZ to be implemented like this. I'll work on adding a field like AdditionalDeployments
. Thanks for the suggestion!
/retest
PR looks good, just one small comment
/retest
Looks like there's a problem with the E2E test output. Will be looking into this.
The hyphen in --crd-pattern
messed up the test helm command, and since we're just testing if something can be set in the additionalDeployments rather than a specific field, I removed that field.
Actually it looks like the error is coming from the recursivePrinter: https://github.com/willie-yao/cluster-api-operator/blob/25328eb918edd7eb4b2e79cf10ab73cf0ca4f9e1/hack/charts/cluster-api-operator/templates/infra.yaml#L1
I'm not sure how to adjust that function to allow array values to be passed inline. When specifying container customizations for additionalDeployments, using a values file works. Do we have to add support for setting this inline?
I went ahead and removed the test case from helm_test.go
due to the complicated nature of setting additionalDeployments
via inline --set
. If this is something we should support, I'll look into another way to scaffold out the additional customizations.
@willie-yao We can look into setting additionalDeployments
in tests in a follow-up PR
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: alexander-demicev
The full list of commands accepted by this bot can be found here.
The pull request process is described here
LGTM label has been added.
What this PR does / why we need it: This PR adds support for customizing additional provider deployments via the
additionalDeployments
field in the provider spec.additionalDeployments
is a map of the name of the provider to both the deployment and manager spec which is used for customizing the deployment/management container.This PR also adds allows CRDPattern to be configurable in deployment customization. This is to allow for installing additional CRDs through the ASO deployment.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged): Fixes #