Skip to content

Commit 3ce4da2

Browse files
authored
Log rollout events (#1029)
1 parent 4da751b commit 3ce4da2

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

pkg/controller/deployment_inplace.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func (dc *controller) rolloutInPlace(ctx context.Context, d *v1alpha1.MachineDep
5858
// status-rollout steps.
5959
if dc.autoscalerScaleDownAnnotationDuringRollout {
6060
// Annotate all the nodes under this machine-deployment, as roll-out is on-going.
61+
klog.V(3).Infof("RolloutInPlace ongoing for MachineDeployment %q, annotating all nodes under it with %s", d.Name, clusterAutoscalerScaleDownAnnotations)
6162
err := dc.annotateNodesBackingMachineSets(ctx, allMachineSets, clusterAutoscalerScaleDownAnnotations)
6263
if err != nil {
6364
klog.Errorf("failed to add annotations %s on all nodes. Error: %v", clusterAutoscalerScaleDownAnnotations, err)

pkg/controller/deployment_recreate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func (dc *controller) rolloutRecreate(ctx context.Context, d *v1alpha1.MachineDe
5353
// status-rollout steps.
5454
if len(oldISs) > 0 && !dc.machineSetsScaledToZero(oldISs) {
5555
// Annotate all the nodes under this machine-deployment, as roll-out is on-going.
56+
klog.V(3).Infof("RolloutRecreate ongoing for MachineDeployment %q, annotating all nodes under it with %s", d.Name, clusterAutoscalerScaleDownAnnotations)
5657
err := dc.annotateNodesBackingMachineSets(ctx, allISs, clusterAutoscalerScaleDownAnnotations)
5758
if err != nil {
5859
klog.Errorf("Failed to add %s on all nodes. Error: %s", clusterAutoscalerScaleDownAnnotations, err)

pkg/controller/deployment_rolling.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (dc *controller) rolloutRolling(ctx context.Context, d *v1alpha1.MachineDep
7373
// status-rollout steps.
7474
if len(oldISs) > 0 && !dc.machineSetsScaledToZero(oldISs) {
7575
// Annotate all the nodes under this machine-deployment, as roll-out is on-going.
76+
klog.V(3).Infof("RolloutRolling ongoing for MachineDeployment %q, annotating all nodes under it with %s", d.Name, clusterAutoscalerScaleDownAnnotations)
7677
err := dc.annotateNodesBackingMachineSets(ctx, allISs, clusterAutoscalerScaleDownAnnotations)
7778
if err != nil {
7879
klog.Errorf("Failed to add %s on all nodes. Error: %s", clusterAutoscalerScaleDownAnnotations, err)

0 commit comments

Comments
 (0)