Skip to content

Commit

Permalink
fix scale e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Oct 30, 2024
1 parent 834a5b6 commit ebc03fc
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,25 @@ func (r *InMemoryMachineReconciler) reconcileNormalAPIServer(ctx context.Context
}
}

// Create kube-system namespace
kubeSystemNS := &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: metav1.NamespaceSystem,
Labels: map[string]string{
"kubernetes.io/metadata.name": metav1.NamespaceSystem,
},
},
}
if err := inmemoryClient.Get(ctx, client.ObjectKeyFromObject(kubeSystemNS), kubeSystemNS); err != nil {
if !apierrors.IsNotFound(err) {
return ctrl.Result{}, errors.Wrapf(err, "failed to get kube-system Namespace")
}

if err := inmemoryClient.Create(ctx, kubeSystemNS); err != nil && !apierrors.IsAlreadyExists(err) {
return ctrl.Result{}, errors.Wrapf(err, "failed to create kube-system Namespace")
}
}

// If there is not yet an API server listener for this machine.
if !r.APIServerMux.HasAPIServer(listenerName, apiServer) {
// Getting the Kubernetes CA
Expand Down

0 comments on commit ebc03fc

Please sign in to comment.