Skip to content

Commit

Permalink
add Event message when upgrade failed
Browse files Browse the repository at this point in the history
Signed-off-by: hxcGit <houxc_mail@163.com>
  • Loading branch information
xavier-hou committed Apr 11, 2023
1 parent 4b9813f commit 9ccea21
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/staticpod/staticpod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ func (r *ReconcileStaticPod) Reconcile(_ context.Context, request reconcile.Requ
// 3. The worker pod is running, pending or unknown, then just wait
switch info.WorkerPod.Status.Phase {
case corev1.PodFailed:
r.recorder.Eventf(instance, corev1.EventTypeWarning, "StaticPod Upgrade Failed", "Fail to upgrade node: %v", node)
klog.Errorf("Fail to continue upgrade, cause worker pod %s of StaticPod %v in node %s failed",
info.WorkerPod.Name, request.NamespacedName, node)
return reconcile.Result{},
Expand Down

0 comments on commit 9ccea21

Please sign in to comment.