Skip to content

Commit

Permalink
separate PR
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Dec 7, 2023
1 parent bd2a6e1 commit 0e329f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ def deploy_templates(filename, label, substitutions):
elif basename.startswith("cluster-template-"):
template_name = basename.replace("cluster-template-", "").replace(".yaml", "")
deploy_cluster_template(template_name, label, filename, substitutions)
elif basename == "cluster-template.yaml":
template_name = "default"
deploy_cluster_template(template_name, label, filename, substitutions)

def deploy_clusterclass(clusterclass_name, label, filename, substitutions):
apply_clusterclass_cmd = "cat " + filename + " | " + envsubst_cmd + " | " + kubectl_cmd + " apply --namespace=$NAMESPACE -f - && echo \"ClusterClass created from\'" + filename + "\', don't forget to delete\n\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
log.Error(err, "Failed to get config")
return ctrl.Result{}, err
}

Expand All @@ -158,13 +157,13 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return ctrl.Result{}, nil
}
if err != nil {
log.Error(err, "Failed to get owner")
return ctrl.Result{}, err
return ctrl.Result{}, errors.Wrapf(err, "failed to get owner")
}
if configOwner == nil {
return ctrl.Result{}, nil
}
log = log.WithValues(configOwner.GetKind(), klog.KRef(configOwner.GetNamespace(), configOwner.GetName()), "resourceVersion", configOwner.GetResourceVersion())
ctx = ctrl.LoggerInto(ctx, log)

if configOwner.GetKind() == "Machine" {
// AddOwners adds the owners of Machine as k/v pairs to the logger.
Expand Down Expand Up @@ -1045,7 +1044,7 @@ func (r *KubeadmConfigReconciler) storeBootstrapData(ctx context.Context, scope
if !apierrors.IsAlreadyExists(err) {
return errors.Wrapf(err, "failed to create bootstrap data secret for KubeadmConfig %s/%s", scope.Config.Namespace, scope.Config.Name)
}
log.Info("bootstrap data secret for KubeadmConfig already exists, updating", "Secret", klog.KObj(secret))
log.Info("Bootstrap data secret for KubeadmConfig already exists, updating", "Secret", klog.KObj(secret))
if err := r.Client.Update(ctx, secret); err != nil {
return errors.Wrapf(err, "failed to update bootstrap data secret for KubeadmConfig %s/%s", scope.Config.Namespace, scope.Config.Name)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Re

err = r.reconcile(ctx, cluster, deployment)
if err != nil {
log.Error(err, "Failed to reconcile MachineDeployment")
r.recorder.Eventf(deployment, corev1.EventTypeWarning, "ReconcileError", "%v", err)
}
return ctrl.Result{}, err
Expand Down
2 changes: 1 addition & 1 deletion internal/controllers/machineset/machineset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func (r *Reconciler) updateStatus(ctx context.Context, cluster *clusterv1.Cluste
availableReplicasCount++
}
} else if machine.GetDeletionTimestamp().IsZero() {
log.Info("Waiting for the Kubernetes node on the machine to report ready state")
log.V(4).Info("Waiting for the Kubernetes node on the machine to report ready state")
}
}

Expand Down

0 comments on commit 0e329f6

Please sign in to comment.