Skip to content

Commit

Permalink
support ovn eip nats dualstack (#3822)
Browse files Browse the repository at this point in the history
* support ovn eip nats dualstack
---------

Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
bobz965 committed May 7, 2024
1 parent dc2400c commit 591b2f3
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 322 deletions.
28 changes: 28 additions & 0 deletions charts/kube-ovn/templates/kube-ovn-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4Ip
name: V4Ip
type: string
- jsonPath: .status.v6Ip
name: V6Ip
type: string
- jsonPath: .status.ready
name: Ready
type: boolean
Expand Down Expand Up @@ -1325,6 +1331,8 @@ spec:
type: string
v4Ip:
type: string
v6Ip:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -1353,9 +1361,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4IpCidr
name: V4IpCidr
type: string
- jsonPath: .status.v6IpCidr
name: V6IpCidr
type: string
- jsonPath: .status.ready
name: Ready
type: boolean
Expand All @@ -1370,8 +1384,12 @@ spec:
type: boolean
v4Eip:
type: string
v6Eip:
type: string
v4IpCidr:
type: string
v6IpCidr:
type: string
vpc:
type: string
conditions:
Expand Down Expand Up @@ -1404,6 +1422,8 @@ spec:
type: string
v4IpCidr:
type: string
v6IpCidr:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -1438,9 +1458,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4Ip
name: V4Ip
type: string
- jsonPath: .status.v6Ip
name: V6Ip
type: string
- jsonPath: .status.internalPort
name: InternalPort
type: string
Expand Down Expand Up @@ -1512,6 +1538,8 @@ spec:
type: string
v4Ip:
type: string
v6Ip:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
28 changes: 28 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1498,9 +1498,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4Ip
name: V4Ip
type: string
- jsonPath: .status.v6Ip
name: V6Ip
type: string
- jsonPath: .status.ready
name: Ready
type: boolean
Expand Down Expand Up @@ -1555,6 +1561,8 @@ spec:
type: string
v4Ip:
type: string
v6Ip:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -1583,9 +1591,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4IpCidr
name: V4IpCidr
type: string
- jsonPath: .status.v6IpCidr
name: V6IpCidr
type: string
- jsonPath: .status.ready
name: Ready
type: boolean
Expand All @@ -1600,8 +1614,12 @@ spec:
type: boolean
v4Eip:
type: string
v6Eip:
type: string
v4IpCidr:
type: string
v6IpCidr:
type: string
vpc:
type: string
conditions:
Expand Down Expand Up @@ -1634,6 +1652,8 @@ spec:
type: string
v4IpCidr:
type: string
v6IpCidr:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -1668,9 +1688,15 @@ spec:
- jsonPath: .status.v4Eip
name: V4Eip
type: string
- jsonPath: .status.v6Eip
name: V6Eip
type: string
- jsonPath: .status.v4Ip
name: V4Ip
type: string
- jsonPath: .status.v6Ip
name: V6Ip
type: string
- jsonPath: .status.internalPort
name: InternalPort
type: string
Expand Down Expand Up @@ -1742,6 +1768,8 @@ spec:
type: string
v4Ip:
type: string
v6Ip:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/kubeovn/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ type OvnFipSpec struct {
IPName string `json:"ipName"` // vip, ip crd name
Vpc string `json:"vpc"`
V4Ip string `json:"v4Ip"`
V6Ip string `json:"v6Ip"`
}

// OvnFipCondition describes the state of an object at a certain point.
Expand All @@ -1018,7 +1019,9 @@ type OvnFipStatus struct {
// +patchStrategy=merge
Vpc string `json:"vpc" patchStrategy:"merge"`
V4Eip string `json:"v4Eip" patchStrategy:"merge"`
V6Eip string `json:"v6Eip" patchStrategy:"merge"`
V4Ip string `json:"v4Ip" patchStrategy:"merge"`
V6Ip string `json:"v6Ip" patchStrategy:"merge"`
Ready bool `json:"ready" patchStrategy:"merge"`

// Conditions represents the latest state of the object
Expand Down Expand Up @@ -1056,6 +1059,7 @@ type OvnSnatRuleSpec struct {
IPName string `json:"ipName"`
Vpc string `json:"vpc"`
V4IpCidr string `json:"v4IpCidr"` // subnet cidr or pod ip address
V6IpCidr string `json:"v6IpCidr"` // subnet cidr or pod ip address
}

// OvnSnatRuleCondition describes the state of an object at a certain point.
Expand All @@ -1067,7 +1071,9 @@ type OvnSnatRuleStatus struct {
// +patchStrategy=merge
Vpc string `json:"vpc" patchStrategy:"merge"`
V4Eip string `json:"v4Eip" patchStrategy:"merge"`
V6Eip string `json:"v6Eip" patchStrategy:"merge"`
V4IpCidr string `json:"v4IpCidr" patchStrategy:"merge"`
V6IpCidr string `json:"v6IpCidr" patchStrategy:"merge"`
Ready bool `json:"ready" patchStrategy:"merge"`

// Conditions represents the latest state of the object
Expand Down Expand Up @@ -1108,6 +1114,7 @@ type OvnDnatRuleSpec struct {
Protocol string `json:"protocol,omitempty"`
Vpc string `json:"vpc"`
V4Ip string `json:"v4Ip"`
V6Ip string `json:"v6Ip"`
}

// OvnDnatRuleCondition describes the state of an object at a certain point.
Expand All @@ -1120,8 +1127,10 @@ type OvnDnatRuleStatus struct {
// +patchStrategy=merge
Vpc string `json:"vpc" patchStrategy:"merge"`
V4Eip string `json:"v4Eip" patchStrategy:"merge"`
V6Eip string `json:"v6Eip" patchStrategy:"merge"`
ExternalPort string `json:"externalPort"`
V4Ip string `json:"v4Ip" patchStrategy:"merge"`
V6Ip string `json:"v6Ip" patchStrategy:"merge"`
InternalPort string `json:"internalPort"`
Protocol string `json:"protocol,omitempty"`
IPName string `json:"ipName"`
Expand Down
Loading

0 comments on commit 591b2f3

Please sign in to comment.