Skip to content

Commit

Permalink
fix client
Browse files Browse the repository at this point in the history
  • Loading branch information
njuettner committed Dec 4, 2024
1 parent daab543 commit 070bef1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controlplane/kubeadm/internal/controllers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,

controllerOwnerRef := *metav1.NewControllerRef(controlPlane.KCP, controlplanev1.GroupVersion.WithKind(kubeadmControlPlaneKind))
clusterName := util.ObjectKey(controlPlane.Cluster)
configSecret, err := secret.GetFromNamespacedName(ctx, r.SecretCachingClient, clusterName, secret.Kubeconfig)
configSecret, err := secret.GetFromNamespacedName(ctx, r.Client, clusterName, secret.Kubeconfig)
switch {
case apierrors.IsNotFound(err):
createErr := kubeconfig.CreateSecretWithOwner(
ctx,
r.SecretCachingClient,
r.Client,
clusterName,
endpoint.String(),
controllerOwnerRef,
Expand Down

0 comments on commit 070bef1

Please sign in to comment.