@@ -85,7 +85,7 @@ func (r *KubeadmConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
85
85
Complete (r )
86
86
}
87
87
88
- // Reconcile TODO
88
+ // Reconcile handles KubeadmConfig events
89
89
func (r * KubeadmConfigReconciler ) Reconcile (req ctrl.Request ) (_ ctrl.Result , rerr error ) {
90
90
ctx := context .Background ()
91
91
log := r .Log .WithValues ("kubeadmconfig" , req .NamespacedName )
@@ -380,7 +380,7 @@ func (r *KubeadmConfigReconciler) ClusterToKubeadmConfigs(o handler.MapObject) [
380
380
return result
381
381
}
382
382
383
- // reconcileDiscovery ensure that config.JoinConfiguration.Discovery is properly set for the joining node.
383
+ // reconcileDiscovery ensures that config.JoinConfiguration.Discovery is properly set for the joining node.
384
384
// The implementation func respect user provided discovery configurations, but in case some of them are missing, a valid BootstrapToken object
385
385
// is automatically injected into config.JoinConfiguration.Discovery.
386
386
// This allows to simplify configuration UX, by providing the option to delegate to CABPK the configuration of kubeadm join discovery.
@@ -398,7 +398,6 @@ func (r *KubeadmConfigReconciler) reconcileDiscovery(cluster *clusterv1.Cluster,
398
398
}
399
399
400
400
// if BootstrapToken already contains an APIServerEndpoint, respect it; otherwise inject the APIServerEndpoint endpoint defined in cluster status
401
- //TODO(fp) might be we want to validate user provided APIServerEndpoint and warn/error if it doesn't match the api endpoint defined at cluster level
402
401
apiServerEndpoint := config .Spec .JoinConfiguration .Discovery .BootstrapToken .APIServerEndpoint
403
402
if apiServerEndpoint == "" {
404
403
if len (cluster .Status .APIEndpoints ) == 0 {
0 commit comments