Skip to content

Clarify API docs about priority conflicts #293

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

Merged
merged 1 commit into from
Apr 13, 2025
Merged
Show file tree
Hide file tree
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
12 changes: 7 additions & 5 deletions apis/v1alpha1/adminnetworkpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ type AdminNetworkPolicySpec struct {
// Priority is a value from 0 to 1000. Policies with lower priority values have
// higher precedence, and are checked before policies with higher priority values.
// All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
// BaselineAdminNetworkPolicy rules
// Every AdminNetworkPolicy should have a unique priority value; if two (or more)
// policies with the same priority could both match a connection, then the
// implementation can apply any of the matching policies to the connection, and
// there is no way for the user to reliably determine which one it will choose.
// BaselineAdminNetworkPolicy rules.
// If two (or more) policies with the same priority could both match a connection,
// then the implementation can apply any of the matching policies to the
// connection, and there is no way for the user to reliably determine which one it
// will choose. Administrators must be careful about assigning the priorities for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// will choose. Administrators must be careful about assigning the priorities for
// will choose unless the implementation provides a way to do so. Administrators must be careful about assigning the priorities for

// policies with rules that will match many connections, and ensure that policies
// have unique priority values in cases where ambiguity would be unacceptable.
//
// Support: Core
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,13 @@ spec:
Priority is a value from 0 to 1000. Policies with lower priority values have
higher precedence, and are checked before policies with higher priority values.
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
BaselineAdminNetworkPolicy rules
Every AdminNetworkPolicy should have a unique priority value; if two (or more)
policies with the same priority could both match a connection, then the
implementation can apply any of the matching policies to the connection, and
there is no way for the user to reliably determine which one it will choose.
BaselineAdminNetworkPolicy rules.
If two (or more) policies with the same priority could both match a connection,
then the implementation can apply any of the matching policies to the
connection, and there is no way for the user to reliably determine which one it
will choose. Administrators must be careful about assigning the priorities for
policies with rules that will match many connections, and ensure that policies
have unique priority values in cases where ambiguity would be unacceptable.

Support: Core
format: int32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,13 @@ spec:
Priority is a value from 0 to 1000. Policies with lower priority values have
higher precedence, and are checked before policies with higher priority values.
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
BaselineAdminNetworkPolicy rules
Every AdminNetworkPolicy should have a unique priority value; if two (or more)
policies with the same priority could both match a connection, then the
implementation can apply any of the matching policies to the connection, and
there is no way for the user to reliably determine which one it will choose.
BaselineAdminNetworkPolicy rules.
If two (or more) policies with the same priority could both match a connection,
then the implementation can apply any of the matching policies to the
connection, and there is no way for the user to reliably determine which one it
will choose. Administrators must be careful about assigning the priorities for
policies with rules that will match many connections, and ensure that policies
have unique priority values in cases where ambiguity would be unacceptable.

Support: Core
format: int32
Expand Down
Loading