Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 5bf8343

Browse files
authored
Merge pull request #207 from SataQiu/add-validate
Remove redundant TODOs
2 parents 5288ad6 + 6154335 commit 5bf8343

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

controllers/kubeadmconfig_controller.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (r *KubeadmConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
8585
Complete(r)
8686
}
8787

88-
// Reconcile TODO
88+
// Reconcile handles KubeadmConfig events
8989
func (r *KubeadmConfigReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, rerr error) {
9090
ctx := context.Background()
9191
log := r.Log.WithValues("kubeadmconfig", req.NamespacedName)
@@ -380,7 +380,7 @@ func (r *KubeadmConfigReconciler) ClusterToKubeadmConfigs(o handler.MapObject) [
380380
return result
381381
}
382382

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.
384384
// The implementation func respect user provided discovery configurations, but in case some of them are missing, a valid BootstrapToken object
385385
// is automatically injected into config.JoinConfiguration.Discovery.
386386
// 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,
398398
}
399399

400400
// 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
402401
apiServerEndpoint := config.Spec.JoinConfiguration.Discovery.BootstrapToken.APIServerEndpoint
403402
if apiServerEndpoint == "" {
404403
if len(cluster.Status.APIEndpoints) == 0 {

0 commit comments

Comments
 (0)