Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure cleanup of IT resources and processes #968

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
2 changes: 2 additions & 0 deletions pkg/controller/machine_safety.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ func (c *controller) freezeMachineSetAndDeployment(ctx context.Context, machineS
}
}

c.recorder.Eventf(machineSet, "Normal", "FrozeMachineSet", "SafetyController: Froze MachineSet %s due to replica overshooting", machineSet.Name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please make constants for this FrozeMachineSet ? We have done this inconsistenly, See controller.emitRollbackNormalEven. But let us clean up the places instead ofusing literal strings. Also we should use corev1.EventTypeNormal

klog.V(2).Infof("SafetyController: Froze MachineSet %q due to overshooting of replicas", machineSet.Name)
return nil
}
Expand Down Expand Up @@ -398,6 +399,7 @@ func (c *controller) unfreezeMachineSet(ctx context.Context, machineSet *v1alpha
return err
}

c.recorder.Eventf(machineSet, "Normal", "UnfrozeMachineSet", "SafetyController: Unfroze MachineSet %s", machineSet.Name)
klog.V(2).Infof("SafetyController: Unfroze MachineSet %q", machineSet.Name)
return nil
}
Expand Down
Loading