Skip to content

Commit

Permalink
fix nit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jun 17, 2024
1 parent d049e32 commit 9b3e4d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope)
}

// NOTE: It is not required to provide in input ClusterConfiguration because only clusterConfiguration.APIServer.TimeoutForControlPlane
// has been migrated to JoinConfiguration in the kubeadm v1beta4 API version, and this field do not apply to workers.
// has been migrated to JoinConfiguration in the kubeadm v1beta4 API version, and this field does not apply to workers.
joinData, err := kubeadmtypes.MarshalJoinConfigurationForVersion(nil, joinConfiguration, parsedVersion)
if err != nil {
scope.Error(err, "Failed to marshal join configuration")
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/kubeadm/types/upstreamv1beta4/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (src *JoinConfiguration) ConvertToClusterConfiguration(clusterConfiguration
}

if clusterConfiguration == nil {
clusterConfiguration = &bootstrapv1.ClusterConfiguration{}
return errors.New("cannot convert JoinConfiguration to a nil ClusterConfiguration")
}
clusterConfiguration.APIServer.TimeoutForControlPlane = src.Timeouts.ControlPlaneComponentHealthCheck
return nil
Expand Down

0 comments on commit 9b3e4d9

Please sign in to comment.