mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
The newControlPlane flag has been historically problematic, since it implies that the function FetchInitConfigurationFromCluster cannot handle the cases where a node is worker node but we still want to fetch its NodeRegistrationOptions conditionally, in cases such as "upgrade node" for workers. To fix this issue, replace the flag newControlPlaneNode with two new flags getNodeRegistration and getAPIEndpoint. If getNodeRegistration is true, we fetch the NRO, and if getAPIEndpoint is true, we fetch the API endpoint for that node. Additionally, rename skipComponentConfigs to getComponentConfigs for consistency and flip its value accordingly everywhere.