Skip to content

Commit 0b022ee

Browse files
huikangHui Kang
and
Hui Kang
authored
feat: emit rollout delete event (#1893)
Signed-off-by: Hui Kang <[email protected]> Co-authored-by: Hui Kang <[email protected]>
1 parent 9c87d0d commit 0b022ee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

rollout/controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func NewController(cfg ControllerConfig) *Controller {
254254
for _, key := range istioutil.GetRolloutDesinationRuleKeys(ro) {
255255
controller.IstioController.EnqueueDestinationRule(key)
256256
}
257+
controller.recorder.Eventf(ro, record.EventOptions{EventReason: conditions.RolloutDeletedReason}, conditions.RolloutDeletedMessage, ro.Name, ro.Namespace)
257258
}
258259
},
259260
})

utils/conditions/conditions.go

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ const (
129129
// within the given deadline (progressDeadlineSeconds).
130130
RolloutTimeOutMessage = "Rollout %q has timed out progressing."
131131

132+
RolloutDeletedReason = "RolloutDeleted"
133+
RolloutDeletedMessage = "Rollout %s/%s is deleted."
134+
132135
ScalingReplicaSetReason = "ScalingReplicaSet"
133136
ScalingReplicaSetMessage = "Scaled %s ReplicaSet %s (revision %d) from %d to %d"
134137

0 commit comments

Comments
 (0)