Skip to content

Commit 9b3e4d9

Browse files
committed
fix nit
1 parent d049e32 commit 9b3e4d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func (r *KubeadmConfigReconciler) joinWorker(ctx context.Context, scope *Scope)
606606
}
607607

608608
// NOTE: It is not required to provide in input ClusterConfiguration because only clusterConfiguration.APIServer.TimeoutForControlPlane
609-
// has been migrated to JoinConfiguration in the kubeadm v1beta4 API version, and this field do not apply to workers.
609+
// has been migrated to JoinConfiguration in the kubeadm v1beta4 API version, and this field does not apply to workers.
610610
joinData, err := kubeadmtypes.MarshalJoinConfigurationForVersion(nil, joinConfiguration, parsedVersion)
611611
if err != nil {
612612
scope.Error(err, "Failed to marshal join configuration")

bootstrap/kubeadm/types/upstreamv1beta4/conversion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (src *JoinConfiguration) ConvertToClusterConfiguration(clusterConfiguration
252252
}
253253

254254
if clusterConfiguration == nil {
255-
clusterConfiguration = &bootstrapv1.ClusterConfiguration{}
255+
return errors.New("cannot convert JoinConfiguration to a nil ClusterConfiguration")
256256
}
257257
clusterConfiguration.APIServer.TimeoutForControlPlane = src.Timeouts.ControlPlaneComponentHealthCheck
258258
return nil

0 commit comments

Comments
 (0)