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

fix: add missing status equal for SecurityPolicy #2134

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
// 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 @@
return true
}
}
case *egv1a1.SecurityPolicy:
if b, ok := objB.(*egv1a1.SecurityPolicy); ok {
if cmp.Equal(a.Status, b.Status, opts) {
return true
}

Check warning on line 240 in internal/status/status.go

View check run for this annotation

Codecov / codecov/patch

internal/status/status.go#L236-L240

Added lines #L236 - L240 were not covered by tests
}
}

return false
Expand Down