Skip to content

Commit 613c3a6

Browse files
committed
Some minor rewording of the priority conflict
This makes it more clear that admins should make different priorties for conflicts.
1 parent e333b5e commit 613c3a6

File tree

3 files changed

+39
-27
lines changed

3 files changed

+39
-27
lines changed

apis/v1alpha1/adminnetworkpolicy_types.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,20 @@ type AdminNetworkPolicyStatus struct {
5656

5757
// AdminNetworkPolicySpec defines the desired state of AdminNetworkPolicy.
5858
type AdminNetworkPolicySpec struct {
59-
// Priority is a value from 0 to 1000. Policies with lower priority values have
60-
// higher precedence, and are checked before policies with higher priority values.
61-
// All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
59+
// Priority is a value from 0 to 1000. Policies with lower numeric
60+
// priority values have higher precedence, and are checked before
61+
// policies with higher priority values. All AdminNetworkPolicy rules
62+
// have higher precedence than NetworkPolicy or
6263
// BaselineAdminNetworkPolicy rules.
63-
// If two (or more) policies with the same priority could both match a connection,
64-
// then the implementation can apply any of the matching policies to the
65-
// connection, and there is no way for the user to reliably determine which one it
66-
// will choose. Administrators must be careful about assigning the priorities for
67-
// policies with rules that will match many connections, and ensure that policies
68-
// have unique priority values in cases where ambiguity would be unacceptable.
64+
//
65+
// If two (or more) policies with equal priority match the same
66+
// traffic, then any one of the policies will be applied to the
67+
// traffic. There is no way for the user to reliably determine the
68+
// policy that will be applied.
69+
//
70+
// Administrators should use different priorities numbers if
71+
// non-deterministic matching between overlapping policies is a
72+
// problem.
6973
//
7074
// +kubebuilder:validation:Minimum=0
7175
// +kubebuilder:validation:Maximum=1000

config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,16 +776,20 @@ spec:
776776
type: array
777777
priority:
778778
description: |-
779-
Priority is a value from 0 to 1000. Policies with lower priority values have
780-
higher precedence, and are checked before policies with higher priority values.
781-
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
779+
Priority is a value from 0 to 1000. Policies with lower numeric
780+
priority values have higher precedence, and are checked before
781+
policies with higher priority values. All AdminNetworkPolicy rules
782+
have higher precedence than NetworkPolicy or
782783
BaselineAdminNetworkPolicy rules.
783-
If two (or more) policies with the same priority could both match a connection,
784-
then the implementation can apply any of the matching policies to the
785-
connection, and there is no way for the user to reliably determine which one it
786-
will choose. Administrators must be careful about assigning the priorities for
787-
policies with rules that will match many connections, and ensure that policies
788-
have unique priority values in cases where ambiguity would be unacceptable.
784+
785+
If two (or more) policies with equal priority match the same
786+
traffic, then any one of the policies will be applied to the
787+
traffic. There is no way for the user to reliably determine the
788+
policy that will be applied.
789+
790+
Administrators should use different priorities numbers if
791+
non-deterministic matching between overlapping policies is a
792+
problem.
789793
format: int32
790794
maximum: 1000
791795
minimum: 0

config/crd/standard/policy.networking.k8s.io_adminnetworkpolicies.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,20 @@ spec:
667667
type: array
668668
priority:
669669
description: |-
670-
Priority is a value from 0 to 1000. Policies with lower priority values have
671-
higher precedence, and are checked before policies with higher priority values.
672-
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
670+
Priority is a value from 0 to 1000. Policies with lower numeric
671+
priority values have higher precedence, and are checked before
672+
policies with higher priority values. All AdminNetworkPolicy rules
673+
have higher precedence than NetworkPolicy or
673674
BaselineAdminNetworkPolicy rules.
674-
If two (or more) policies with the same priority could both match a connection,
675-
then the implementation can apply any of the matching policies to the
676-
connection, and there is no way for the user to reliably determine which one it
677-
will choose. Administrators must be careful about assigning the priorities for
678-
policies with rules that will match many connections, and ensure that policies
679-
have unique priority values in cases where ambiguity would be unacceptable.
675+
676+
If two (or more) policies with equal priority match the same
677+
traffic, then any one of the policies will be applied to the
678+
traffic. There is no way for the user to reliably determine the
679+
policy that will be applied.
680+
681+
Administrators should use different priorities numbers if
682+
non-deterministic matching between overlapping policies is a
683+
problem.
680684
format: int32
681685
maximum: 1000
682686
minimum: 0

0 commit comments

Comments
 (0)