Skip to content

Commit dcc96c8

Browse files
authored
Merge pull request #329 from bowei/pr-reduce-to-25
Change MaxItems from 100 to 25
2 parents 534c5a3 + d5b5d56 commit dcc96c8

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

apis/v1alpha2/clusternetworkpolicy_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ type ClusterNetworkPolicySpec struct {
110110
// CNPs with no ingress rules do not affect ingress traffic.
111111
//
112112
// +optional
113-
// +kubebuilder:validation:MaxItems=100
113+
// +kubebuilder:validation:MaxItems=25
114114
Ingress []ClusterNetworkPolicyIngressRule `json:"ingress,omitempty"`
115115

116116
// Egress is the list of Egress rules to be applied to the selected pods.
@@ -123,7 +123,7 @@ type ClusterNetworkPolicySpec struct {
123123
// CNPs with no egress rules do not affect egress traffic.
124124
//
125125
// +optional
126-
// +kubebuilder:validation:MaxItems=100
126+
// +kubebuilder:validation:MaxItems=25
127127
Egress []ClusterNetworkPolicyEgressRule `json:"egress,omitempty"`
128128
}
129129

@@ -199,7 +199,7 @@ type ClusterNetworkPolicyIngressRule struct {
199199
// This field must be defined and contain at least one item.
200200
//
201201
// +kubebuilder:validation:MinItems=1
202-
// +kubebuilder:validation:MaxItems=100
202+
// +kubebuilder:validation:MaxItems=25
203203
From []ClusterNetworkPolicyIngressPeer `json:"from"`
204204

205205
// Ports allows for matching traffic based on port and protocols.
@@ -210,7 +210,7 @@ type ClusterNetworkPolicyIngressRule struct {
210210
//
211211
// +optional
212212
// +kubebuilder:validation:MinItems=1
213-
// +kubebuilder:validation:MaxItems=100
213+
// +kubebuilder:validation:MaxItems=25
214214
Ports *[]ClusterNetworkPolicyPort `json:"ports,omitempty"`
215215
}
216216

@@ -251,7 +251,7 @@ type ClusterNetworkPolicyEgressRule struct {
251251
// This field must be defined and contain at least one item.
252252
//
253253
// +kubebuilder:validation:MinItems=1
254-
// +kubebuilder:validation:MaxItems=100
254+
// +kubebuilder:validation:MaxItems=25
255255
To []ClusterNetworkPolicyEgressPeer `json:"to"`
256256

257257
// Ports allows for matching traffic based on port and protocols.
@@ -260,7 +260,7 @@ type ClusterNetworkPolicyEgressRule struct {
260260
//
261261
// +optional
262262
// +kubebuilder:validation:MinItems=1
263-
// +kubebuilder:validation:MaxItems=100
263+
// +kubebuilder:validation:MaxItems=25
264264
Ports *[]ClusterNetworkPolicyPort `json:"ports,omitempty"`
265265
}
266266

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ spec:
173173
- message: Start port must be less than End port
174174
rule: self.start < self.end
175175
type: object
176-
maxItems: 100
176+
maxItems: 25
177177
minItems: 1
178178
type: array
179179
to:
@@ -473,7 +473,7 @@ spec:
473473
- podSelector
474474
type: object
475475
type: object
476-
maxItems: 100
476+
maxItems: 25
477477
minItems: 1
478478
type: array
479479
required:
@@ -486,7 +486,7 @@ spec:
486486
rule: '!(self.to.exists(peer, has(peer.networks) || has(peer.nodes)
487487
|| has(peer.domainNames)) && has(self.ports) && self.ports.exists(port,
488488
has(port.namedPort)))'
489-
maxItems: 100
489+
maxItems: 25
490490
type: array
491491
ingress:
492492
description: |-
@@ -708,7 +708,7 @@ spec:
708708
- podSelector
709709
type: object
710710
type: object
711-
maxItems: 100
711+
maxItems: 25
712712
minItems: 1
713713
type: array
714714
name:
@@ -796,14 +796,14 @@ spec:
796796
- message: Start port must be less than End port
797797
rule: self.start < self.end
798798
type: object
799-
maxItems: 100
799+
maxItems: 25
800800
minItems: 1
801801
type: array
802802
required:
803803
- action
804804
- from
805805
type: object
806-
maxItems: 100
806+
maxItems: 25
807807
type: array
808808
priority:
809809
description: |-

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ spec:
165165
- message: Start port must be less than End port
166166
rule: self.start < self.end
167167
type: object
168-
maxItems: 100
168+
maxItems: 25
169169
minItems: 1
170170
type: array
171171
to:
@@ -373,14 +373,14 @@ spec:
373373
- podSelector
374374
type: object
375375
type: object
376-
maxItems: 100
376+
maxItems: 25
377377
minItems: 1
378378
type: array
379379
required:
380380
- action
381381
- to
382382
type: object
383-
maxItems: 100
383+
maxItems: 25
384384
type: array
385385
ingress:
386386
description: |-
@@ -602,7 +602,7 @@ spec:
602602
- podSelector
603603
type: object
604604
type: object
605-
maxItems: 100
605+
maxItems: 25
606606
minItems: 1
607607
type: array
608608
name:
@@ -682,14 +682,14 @@ spec:
682682
- message: Start port must be less than End port
683683
rule: self.start < self.end
684684
type: object
685-
maxItems: 100
685+
maxItems: 25
686686
minItems: 1
687687
type: array
688688
required:
689689
- action
690690
- from
691691
type: object
692-
maxItems: 100
692+
maxItems: 25
693693
type: array
694694
priority:
695695
description: |-

0 commit comments

Comments
 (0)