Skip to content

Commit

Permalink
Add Controlplane changes for NodeNetworkPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Kumar Atish <[email protected]>
  • Loading branch information
Atish-iaf committed Nov 16, 2023
1 parent bdf2d6b commit 1d9a71a
Show file tree
Hide file tree
Showing 19 changed files with 1,261 additions and 112 deletions.
2 changes: 1 addition & 1 deletion cmd/antrea-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func run(o *Options) error {
egressGroupStore := egressstore.NewEgressGroupStore()
groupStore := store.NewGroupStore()
groupEntityIndex := grouping.NewGroupEntityIndex()
groupEntityController := grouping.NewGroupEntityController(groupEntityIndex, podInformer, namespaceInformer, eeInformer)
groupEntityController := grouping.NewGroupEntityController(groupEntityIndex, podInformer, namespaceInformer, eeInformer, nodeInformer)
labelIdentityIndex := labelidentity.NewLabelIdentityIndex()
networkPolicyController := networkpolicy.NewNetworkPolicyController(client,
crdClient,
Expand Down
320 changes: 304 additions & 16 deletions multicluster/build/yamls/antrea-multicluster-leader-global.yml

Large diffs are not rendered by default.

320 changes: 304 additions & 16 deletions multicluster/build/yamls/antrea-multicluster-leader.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,52 @@ spec:
description: AppliedTo describes the grouping selector of workloads
in AppliedTo field.
properties:
NodeSelector:
description: Select Nodes in cluster as workloads in AppliedTo
fields. Cannot be set with any other selector.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In,
NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists
or DoesNotExist, the values array must be empty.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field
is "key", the operator is "In", and the values array
contains only "value". The requirements are ANDed.
type: object
type: object
externalEntitySelector:
description: Select ExternalEntities from NetworkPolicy's
Namespace as workloads in AppliedTo fields. If set with
Expand Down Expand Up @@ -299,6 +345,55 @@ spec:
description: AppliedTo describes the grouping selector
of workloads in AppliedTo field.
properties:
NodeSelector:
description: Select Nodes in cluster as workloads
in AppliedTo fields. Cannot be set with any other
selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are
ANDed.
items:
description: A label selector requirement is
a selector that contains values, a key, and
an operator that relates the key and values.
properties:
key:
description: key is the label key that the
selector applies to.
type: string
operator:
description: operator represents a key's
relationship to a set of values. Valid
operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty. If
the operator is Exists or DoesNotExist,
the values array must be empty. This array
is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is "In",
and the values array contains only "value".
The requirements are ANDed.
type: object
type: object
externalEntitySelector:
description: Select ExternalEntities from NetworkPolicy's
Namespace as workloads in AppliedTo fields. If set
Expand Down Expand Up @@ -644,8 +739,8 @@ spec:
type: object
nodeSelector:
description: Select certain Nodes which match the
label selector. A NodeSelector cannot be set in
AppliedTo field or set with any other selector.
label selector. A NodeSelector cannot be set with
any other selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
Expand Down Expand Up @@ -1051,8 +1146,8 @@ spec:
type: object
nodeSelector:
description: Select certain Nodes which match the
label selector. A NodeSelector cannot be set in
AppliedTo field or set with any other selector.
label selector. A NodeSelector cannot be set with
any other selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
Expand Down Expand Up @@ -1214,6 +1309,55 @@ spec:
description: AppliedTo describes the grouping selector
of workloads in AppliedTo field.
properties:
NodeSelector:
description: Select Nodes in cluster as workloads
in AppliedTo fields. Cannot be set with any other
selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are
ANDed.
items:
description: A label selector requirement is
a selector that contains values, a key, and
an operator that relates the key and values.
properties:
key:
description: key is the label key that the
selector applies to.
type: string
operator:
description: operator represents a key's
relationship to a set of values. Valid
operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty. If
the operator is Exists or DoesNotExist,
the values array must be empty. This array
is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is "In",
and the values array contains only "value".
The requirements are ANDed.
type: object
type: object
externalEntitySelector:
description: Select ExternalEntities from NetworkPolicy's
Namespace as workloads in AppliedTo fields. If set
Expand Down Expand Up @@ -1559,8 +1703,8 @@ spec:
type: object
nodeSelector:
description: Select certain Nodes which match the
label selector. A NodeSelector cannot be set in
AppliedTo field or set with any other selector.
label selector. A NodeSelector cannot be set with
any other selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
Expand Down Expand Up @@ -1966,8 +2110,8 @@ spec:
type: object
nodeSelector:
description: Select certain Nodes which match the
label selector. A NodeSelector cannot be set in
AppliedTo field or set with any other selector.
label selector. A NodeSelector cannot be set with
any other selector.
properties:
matchExpressions:
description: matchExpressions is a list of label
Expand Down
Loading

0 comments on commit 1d9a71a

Please sign in to comment.