Skip to content

Commit 85c7df4

Browse files
authored
Merge pull request #156 from tssurya/define-ns-pod-peers-properly
Callout namespaces/pods peers do not include host-net pods
2 parents f7e9b37 + fc26a1a commit 85c7df4

5 files changed

+60
-26
lines changed

apis/v1alpha1/shared_types.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,16 @@ type PortRange struct {
127127
// +kubebuilder:validation:MaxProperties=1
128128
// +kubebuilder:validation:MinProperties=1
129129
type AdminNetworkPolicyPeer struct {
130-
// Namespaces defines a way to select a set of Namespaces.
130+
// Namespaces defines a way to select all pods within a set of Namespaces.
131+
// Note that host-networked pods are not included in this type of peer.
131132
//
132133
// Support: Core
133134
//
134135
// +optional
135136
Namespaces *NamespacedPeer `json:"namespaces,omitempty"`
136137
// Pods defines a way to select a set of pods in
137-
// in a set of namespaces.
138+
// in a set of namespaces. Note that host-networked pods
139+
// are not included in this type of peer.
138140
//
139141
// Support: Core
140142
//

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ spec:
165165
minProperties: 1
166166
properties:
167167
namespaces:
168-
description: "Namespaces defines a way to select a set
169-
of Namespaces. \n Support: Core"
168+
description: "Namespaces defines a way to select all pods
169+
within a set of Namespaces. Note that host-networked
170+
pods are not included in this type of peer. \n Support:
171+
Core"
170172
maxProperties: 1
171173
minProperties: 1
172174
properties:
@@ -249,7 +251,9 @@ spec:
249251
type: object
250252
pods:
251253
description: "Pods defines a way to select a set of pods
252-
in in a set of namespaces. \n Support: Core"
254+
in in a set of namespaces. Note that host-networked
255+
pods are not included in this type of peer. \n Support:
256+
Core"
253257
properties:
254258
namespaces:
255259
description: "Namespaces is used to select a set of
@@ -445,8 +449,10 @@ spec:
445449
minProperties: 1
446450
properties:
447451
namespaces:
448-
description: "Namespaces defines a way to select a set
449-
of Namespaces. \n Support: Core"
452+
description: "Namespaces defines a way to select all pods
453+
within a set of Namespaces. Note that host-networked
454+
pods are not included in this type of peer. \n Support:
455+
Core"
450456
maxProperties: 1
451457
minProperties: 1
452458
properties:
@@ -529,7 +535,9 @@ spec:
529535
type: object
530536
pods:
531537
description: "Pods defines a way to select a set of pods
532-
in in a set of namespaces. \n Support: Core"
538+
in in a set of namespaces. Note that host-networked
539+
pods are not included in this type of peer. \n Support:
540+
Core"
533541
properties:
534542
namespaces:
535543
description: "Namespaces is used to select a set of

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@ spec:
157157
minProperties: 1
158158
properties:
159159
namespaces:
160-
description: "Namespaces defines a way to select a set
161-
of Namespaces. \n Support: Core"
160+
description: "Namespaces defines a way to select all pods
161+
within a set of Namespaces. Note that host-networked
162+
pods are not included in this type of peer. \n Support:
163+
Core"
162164
maxProperties: 1
163165
minProperties: 1
164166
properties:
@@ -241,7 +243,9 @@ spec:
241243
type: object
242244
pods:
243245
description: "Pods defines a way to select a set of pods
244-
in in a set of namespaces. \n Support: Core"
246+
in in a set of namespaces. Note that host-networked
247+
pods are not included in this type of peer. \n Support:
248+
Core"
245249
properties:
246250
namespaces:
247251
description: "Namespaces is used to select a set of
@@ -432,8 +436,10 @@ spec:
432436
minProperties: 1
433437
properties:
434438
namespaces:
435-
description: "Namespaces defines a way to select a set
436-
of Namespaces. \n Support: Core"
439+
description: "Namespaces defines a way to select all pods
440+
within a set of Namespaces. Note that host-networked
441+
pods are not included in this type of peer. \n Support:
442+
Core"
437443
maxProperties: 1
438444
minProperties: 1
439445
properties:
@@ -516,7 +522,9 @@ spec:
516522
type: object
517523
pods:
518524
description: "Pods defines a way to select a set of pods
519-
in in a set of namespaces. \n Support: Core"
525+
in in a set of namespaces. Note that host-networked
526+
pods are not included in this type of peer. \n Support:
527+
Core"
520528
properties:
521529
namespaces:
522530
description: "Namespaces is used to select a set of

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ spec:
161161
minProperties: 1
162162
properties:
163163
namespaces:
164-
description: "Namespaces defines a way to select a set
165-
of Namespaces. \n Support: Core"
164+
description: "Namespaces defines a way to select all pods
165+
within a set of Namespaces. Note that host-networked
166+
pods are not included in this type of peer. \n Support:
167+
Core"
166168
maxProperties: 1
167169
minProperties: 1
168170
properties:
@@ -220,7 +222,9 @@ spec:
220222
type: object
221223
pods:
222224
description: "Pods defines a way to select a set of pods
223-
in in a set of namespaces. \n Support: Core"
225+
in in a set of namespaces. Note that host-networked
226+
pods are not included in this type of peer. \n Support:
227+
Core"
224228
properties:
225229
namespaces:
226230
description: "Namespaces is used to select a set of
@@ -390,8 +394,10 @@ spec:
390394
minProperties: 1
391395
properties:
392396
namespaces:
393-
description: "Namespaces defines a way to select a set
394-
of Namespaces. \n Support: Core"
397+
description: "Namespaces defines a way to select all pods
398+
within a set of Namespaces. Note that host-networked
399+
pods are not included in this type of peer. \n Support:
400+
Core"
395401
maxProperties: 1
396402
minProperties: 1
397403
properties:
@@ -449,7 +455,9 @@ spec:
449455
type: object
450456
pods:
451457
description: "Pods defines a way to select a set of pods
452-
in in a set of namespaces. \n Support: Core"
458+
in in a set of namespaces. Note that host-networked
459+
pods are not included in this type of peer. \n Support:
460+
Core"
453461
properties:
454462
namespaces:
455463
description: "Namespaces is used to select a set of

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ spec:
153153
minProperties: 1
154154
properties:
155155
namespaces:
156-
description: "Namespaces defines a way to select a set
157-
of Namespaces. \n Support: Core"
156+
description: "Namespaces defines a way to select all pods
157+
within a set of Namespaces. Note that host-networked
158+
pods are not included in this type of peer. \n Support:
159+
Core"
158160
maxProperties: 1
159161
minProperties: 1
160162
properties:
@@ -212,7 +214,9 @@ spec:
212214
type: object
213215
pods:
214216
description: "Pods defines a way to select a set of pods
215-
in in a set of namespaces. \n Support: Core"
217+
in in a set of namespaces. Note that host-networked
218+
pods are not included in this type of peer. \n Support:
219+
Core"
216220
properties:
217221
namespaces:
218222
description: "Namespaces is used to select a set of
@@ -377,8 +381,10 @@ spec:
377381
minProperties: 1
378382
properties:
379383
namespaces:
380-
description: "Namespaces defines a way to select a set
381-
of Namespaces. \n Support: Core"
384+
description: "Namespaces defines a way to select all pods
385+
within a set of Namespaces. Note that host-networked
386+
pods are not included in this type of peer. \n Support:
387+
Core"
382388
maxProperties: 1
383389
minProperties: 1
384390
properties:
@@ -436,7 +442,9 @@ spec:
436442
type: object
437443
pods:
438444
description: "Pods defines a way to select a set of pods
439-
in in a set of namespaces. \n Support: Core"
445+
in in a set of namespaces. Note that host-networked
446+
pods are not included in this type of peer. \n Support:
447+
Core"
440448
properties:
441449
namespaces:
442450
description: "Namespaces is used to select a set of

0 commit comments

Comments
 (0)