-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
capi-controller-manager continously patches AWSCluster object when using ClusterClass #6320
Comments
/milestone v1.2 The topology reconciler has been specifically designed to not manage only fields that are explicitly defined in templates and some internals of this are described in https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/change-clusterclass.html#reference In order to properly triage the issue, it will be great to have the full output of the AWSCluster object |
Thanks for your fast feedback! Here is the full output of the AWSCluster objects. AWSCluster object when not modified by capa (desired state of capi):
AWSCluster object when modified by capa (undesired state of capi):
Matthias Lembcke <[email protected]>, Daimler TSS GmbH (Provider Information) |
@matlemb thanks. @yastij could you kindly helps us to understand if this problem (items in a slide that are partially edited in the templates, partially edited by the controllers) applies to bring your own subnet only or if it applies to other lists in the APIs |
@fabriziopandini Thank you too. We already tested your workaround successfully. |
sorry removed my comment as it wasn't finished yet, was mainly taking notes of potential slices, just finished it seems like CAPZ is okay, same for CAPV. will take a look at other providers tomorrow |
For CAPA, I was able to reproduce the issue with bring your own infra use case and observed that cluster creation is successful but subnets fields continue oscillating between two states and saturate controller logs :( To confirm my understanding, does the issue happen only when the fields are co-authored by capi and provider controllers and they are a list? From CAPI book, I see the statements.
AWSClusterTemplate
AWSCluster
|
yes, but co-authored by capi is a consequence of fields being defined in the cluster class; this should also clarify your following observation
|
I'm prototyping a fix, but it will take some time... |
/assign |
After investigating the problem, some prototyping and discussions I'm proposing the following way forward:
Please note that:
|
@pydctw Fix was merged, if you have time it would be really great if you can confirm that it solves the issue CAPA had. |
Thanks! I am happy to verify the fix. Will make changes to CAPA (+ run with CAPI main) and report back the result. |
What steps did you take and what happened:
When launching an kubernetes cluster on AWS with Cluster API and consuming existing AWS Infrastructure (existing VPC and subnets) via ClusterClass, capi-controller-manager continously patches the AWSCluster object to the state of AWSClusterTemplate object.
AWSCluster object does get additional information via AWS API calls through capa-controller-manager (for example the routing table, tags, etc.). So both controllers continously are modifying the object resulting in a loop.
What did you expect to happen:
capi-controller-manager should not revert changes done by capa-controller-manager when using ClusterClass. ClusterClass feature relies on AWSClusterTemplate.
Anything else you would like to add:
I believe this is more an capi/clusterclass issue than an capa issue. By design capa needs to write these informations back to the AWSCluster object.
A workaround was tested successfully by defining all additional information into AWSClusterTemplate that was retrieved by capa-controller-manager. However this is not a practical solution (especially for tags as these change by launching new clusters).
AWSCluster object with additional information on the subnets written by capa-controller-manager:
AWSClusterTemplate object with desired state of capi-controller-manager:
Log snippets from capi-controller-manager (grep -i patch):
Log snippets from capa-controller-manager (grep -i network.go):
Environment:
kubectl version
): 1.22.4/etc/os-release
): Ubuntu 20.04/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]
Matthias Lembcke <[email protected]>, Daimler TSS GmbH (Provider Information)
The text was updated successfully, but these errors were encountered: