Skip to content

Commit fcd330d

Browse files
authored
Merge pull request #229 from danwinship/priority-conflict
Update the text about duplicate priority values
2 parents 6bafaf0 + 8be8ff5 commit fcd330d

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

apis/v1alpha1/adminnetworkpolicy_types.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ 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. Rules with lower priority values have
60-
// higher precedence, and are checked before rules with higher priority values.
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.
6161
// All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
6262
// BaselineAdminNetworkPolicy rules
63-
// The behavior is undefined if two ANP objects have same priority.
63+
// Every AdminNetworkPolicy should have a unique priority value; if two (or more)
64+
// policies with the same priority could both match a connection, then the
65+
// implementation can apply any of the matching policies to the connection, and
66+
// there is no way for the user to reliably determine which one it will choose.
6467
//
6568
// Support: Core
6669
//

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -817,11 +817,14 @@ spec:
817817
type: array
818818
priority:
819819
description: |-
820-
Priority is a value from 0 to 1000. Rules with lower priority values have
821-
higher precedence, and are checked before rules with higher priority values.
820+
Priority is a value from 0 to 1000. Policies with lower priority values have
821+
higher precedence, and are checked before policies with higher priority values.
822822
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
823823
BaselineAdminNetworkPolicy rules
824-
The behavior is undefined if two ANP objects have same priority.
824+
Every AdminNetworkPolicy should have a unique priority value; if two (or more)
825+
policies with the same priority could both match a connection, then the
826+
implementation can apply any of the matching policies to the connection, and
827+
there is no way for the user to reliably determine which one it will choose.
825828
826829
827830
Support: Core

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -701,11 +701,14 @@ spec:
701701
type: array
702702
priority:
703703
description: |-
704-
Priority is a value from 0 to 1000. Rules with lower priority values have
705-
higher precedence, and are checked before rules with higher priority values.
704+
Priority is a value from 0 to 1000. Policies with lower priority values have
705+
higher precedence, and are checked before policies with higher priority values.
706706
All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or
707707
BaselineAdminNetworkPolicy rules
708-
The behavior is undefined if two ANP objects have same priority.
708+
Every AdminNetworkPolicy should have a unique priority value; if two (or more)
709+
policies with the same priority could both match a connection, then the
710+
implementation can apply any of the matching policies to the connection, and
711+
there is no way for the user to reliably determine which one it will choose.
709712
710713
711714
Support: Core

0 commit comments

Comments
 (0)