Skip to content

Commit

Permalink
add namespaceSelector field in subnet
Browse files Browse the repository at this point in the history
Signed-off-by: 马洪贞 <[email protected]>
  • Loading branch information
hongzhen-ma committed Sep 13, 2024
1 parent 2b24b2b commit a1765d0
Show file tree
Hide file tree
Showing 68 changed files with 3,529 additions and 734 deletions.
44 changes: 44 additions & 0 deletions charts/kube-ovn/templates/kube-ovn-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,28 @@ spec:
type: string
dstIPs:
type: string
namespaceSelector:
type: array
items:
type: object
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
conditions:
type: array
items:
Expand Down Expand Up @@ -2194,6 +2216,28 @@ spec:
type: boolean
routeTable:
type: string
namespaceSelector:
type: array
items:
type: object
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
scope: Cluster
names:
plural: subnets
Expand Down
44 changes: 44 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,28 @@ spec:
type: string
dstIPs:
type: string
namespaceSelector:
type: array
items:
type: object
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
conditions:
type: array
items:
Expand Down Expand Up @@ -2442,6 +2464,28 @@ spec:
type: boolean
routeTable:
type: string
namespaceSelector:
type: array
items:
type: object
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
scope: Cluster
names:
plural: subnets
Expand Down
4 changes: 3 additions & 1 deletion pkg/apis/kubeovn/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ type SubnetSpec struct {
EnableEcmp bool `json:"enableEcmp,omitempty"`
EnableMulticastSnoop bool `json:"enableMulticastSnoop,omitempty"`

RouteTable string `json:"routeTable,omitempty"`
RouteTable string `json:"routeTable,omitempty"`
NamespaceSelector []metav1.LabelSelector `json:"namespaceSelector,omitempty"`
}

type ACL struct {
Expand Down Expand Up @@ -247,6 +248,7 @@ type SubnetStatus struct {
NatOutgoingPolicyRules []NatOutgoingPolicyRuleStatus `json:"natOutgoingPolicyRules"`
McastQuerierIP string `json:"mcastQuerierIP"`
McastQuerierMAC string `json:"mcastQuerierMAC"`
NamespaceSelector []metav1.LabelSelector `json:"namespaceSelector"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
15 changes: 15 additions & 0 deletions pkg/apis/kubeovn/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 12 additions & 17 deletions pkg/client/clientset/versioned/typed/kubeovn/v1/fake/fake_ip.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 15 additions & 21 deletions pkg/client/clientset/versioned/typed/kubeovn/v1/fake/fake_ippool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a1765d0

Please sign in to comment.