Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi080513 authored and k8s-infra-cherrypick-robot committed Mar 22, 2024
1 parent e340ba4 commit b96e9ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controlplane/kubeadm/internal/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,13 @@ func matchClusterConfiguration(kcp *controlplanev1.KubeadmControlPlane, machine
machineClusterConfig = &bootstrapv1.ClusterConfiguration{}
}

kcpLocalClusterConfiguration := kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.DeepCopy()
kcpLocalClusterConfiguration := kcp.Spec.KubeadmConfigSpec.ClusterConfiguration
if kcpLocalClusterConfiguration == nil {
kcpLocalClusterConfiguration = &bootstrapv1.ClusterConfiguration{}
}

// Skip checking DNS fields because we can update the configuration of the working cluster in place.
kcpLocalClusterConfiguration.DNS = bootstrapv1.DNS{}
machineClusterConfig.DNS = bootstrapv1.DNS{}
machineClusterConfig.DNS = kcpLocalClusterConfiguration.DNS

// Compare and return.
return reflect.DeepEqual(machineClusterConfig, kcpLocalClusterConfiguration)
Expand Down

0 comments on commit b96e9ac

Please sign in to comment.