Skip to content

Commit

Permalink
fix: add missing status equal for SecurityPolicy (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunzhuo committed Oct 31, 2023
1 parent 57e1aec commit 71c09f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (u *UpdateWriter) Send(update Update) {
// GRPCRoute
// EnvoyPatchPolicy
// ClientTrafficPolicy
// SecurityPolicy
func isStatusEqual(objA, objB interface{}) bool {
opts := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime")
switch a := objA.(type) {
Expand Down Expand Up @@ -232,6 +233,12 @@ func isStatusEqual(objA, objB interface{}) bool {
return true
}
}
case *egv1a1.SecurityPolicy:
if b, ok := objB.(*egv1a1.SecurityPolicy); ok {
if cmp.Equal(a.Status, b.Status, opts) {
return true
}
}
}

return false
Expand Down

0 comments on commit 71c09f2

Please sign in to comment.