Skip to content

Commit

Permalink
feat: emit rollout delete event
Browse files Browse the repository at this point in the history
Signed-off-by: Hui Kang <[email protected]>
  • Loading branch information
Hui Kang committed Mar 2, 2022
1 parent 575a619 commit 9b7208f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rollout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func NewController(cfg ControllerConfig) *Controller {
for _, key := range istioutil.GetRolloutDesinationRuleKeys(ro) {
controller.IstioController.EnqueueDestinationRule(key)
}
controller.recorder.Eventf(ro, record.EventOptions{EventReason: conditions.RolloutDeletedReason}, conditions.RolloutDeletedMessage, ro.Name, ro.Namespace)
}
},
})
Expand Down
3 changes: 3 additions & 0 deletions utils/conditions/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ const (
// within the given deadline (progressDeadlineSeconds).
RolloutTimeOutMessage = "Rollout %q has timed out progressing."

RolloutDeletedReason = "RolloutDeleted"
RolloutDeletedMessage = "Rollout %s/%s is deleted."

ScalingReplicaSetReason = "ScalingReplicaSet"
ScalingReplicaSetMessage = "Scaled %s ReplicaSet %s (revision %d) from %d to %d"

Expand Down

0 comments on commit 9b7208f

Please sign in to comment.