Closed rifelpet closed 2 months ago
/approve /lgtm
(We discussed in office hours, this uniqueness requirement was introduced in https://github.com/kubernetes-sigs/controller-runtime/commit/2b941650bce159006c88bd3ca0d132c7bc40e947 )
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: justinsb
The full list of commands accepted by this bot can be found here.
The pull request process is described here
This makes progress on fixing ipv6 support.
For IPV6 clusters we enable an ipam controller in kops-controller:
https://github.com/kubernetes/kops/blob/423b640de6cd18c99fea5c43f938e029a8d8aad6/pkg/apis/kops/cluster.go#L949-L951
https://github.com/kubernetes/kops/blob/423b640de6cd18c99fea5c43f938e029a8d8aad6/upup/pkg/fi/cloudup/template_functions.go#L774-L776
https://github.com/kubernetes/kops/blob/423b640de6cd18c99fea5c43f938e029a8d8aad6/cmd/kops-controller/main.go#L221-L227
controller-runtime's manager picks "names" for each controller it manages, and defaults to the
kind
it watches:https://github.com/kubernetes-sigs/controller-runtime/blob/38546806f2faf5973e3321a7bd5bb3afdbb5767d/pkg/builder/controller.go#L247-L257
This means that alongside the node bootstrap controller, there are multiple controllers watching nodes. This results in a conflict which causes kops-controller to crash loop:
This PR gives each controller a unique name to avoid the conflict.