Skip to content

Commit

Permalink
Merge pull request #1873 from mkowalski/api-update-for-cno
Browse files Browse the repository at this point in the history
OPNET-512: config/v1/types_infrastructure: change set to atomic for networks
  • Loading branch information
openshift-merge-bot[bot] authored Apr 29, 2024
2 parents 8203151 + b5cb8e3 commit ac9356b
Show file tree
Hide file tree
Showing 25 changed files with 2,050 additions and 450 deletions.
52 changes: 34 additions & 18 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ type BareMetalPlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
APIServerInternalIPs []IP `json:"apiServerInternalIPs"`

Expand All @@ -840,15 +840,16 @@ type BareMetalPlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
IngressIPs []IP `json:"ingressIPs"`

// machineNetworks are IP networks used to connect all the OpenShift cluster
// nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6,
// for example "10.0.0.0/8" or "fd00::/8".
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand All @@ -873,7 +874,8 @@ type BareMetalPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
APIServerInternalIPs []string `json:"apiServerInternalIPs"`

// ingressIP is an external IP which routes to the default ingress controller.
Expand All @@ -889,7 +891,8 @@ type BareMetalPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
IngressIPs []string `json:"ingressIPs"`

// nodeDNSIP is the IP address for the internal DNS used by the
Expand All @@ -908,8 +911,9 @@ type BareMetalPlatformStatus struct {
LoadBalancer *BareMetalPlatformLoadBalancer `json:"loadBalancer,omitempty"`

// machineNetworks are IP networks used to connect all the OpenShift cluster nodes.
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand Down Expand Up @@ -952,7 +956,7 @@ type OpenStackPlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
APIServerInternalIPs []IP `json:"apiServerInternalIPs"`

Expand All @@ -967,15 +971,16 @@ type OpenStackPlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
IngressIPs []IP `json:"ingressIPs"`

// machineNetworks are IP networks used to connect all the OpenShift cluster
// nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6,
// for example "10.0.0.0/8" or "fd00::/8".
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand All @@ -998,7 +1003,8 @@ type OpenStackPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
APIServerInternalIPs []string `json:"apiServerInternalIPs"`

// cloudName is the name of the desired OpenStack cloud in the
Expand All @@ -1018,7 +1024,8 @@ type OpenStackPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
IngressIPs []string `json:"ingressIPs"`

// nodeDNSIP is the IP address for the internal DNS used by the
Expand All @@ -1036,8 +1043,9 @@ type OpenStackPlatformStatus struct {
LoadBalancer *OpenStackPlatformLoadBalancer `json:"loadBalancer,omitempty"`

// machineNetworks are IP networks used to connect all the OpenShift cluster nodes.
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand Down Expand Up @@ -1085,6 +1093,7 @@ type OvirtPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
APIServerInternalIPs []string `json:"apiServerInternalIPs"`

Expand All @@ -1101,6 +1110,7 @@ type OvirtPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
IngressIPs []string `json:"ingressIPs"`

Expand Down Expand Up @@ -1366,7 +1376,7 @@ type VSpherePlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
APIServerInternalIPs []IP `json:"apiServerInternalIPs"`

Expand All @@ -1381,15 +1391,16 @@ type VSpherePlatformSpec struct {
//
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
// +listType=atomic
// +optional
IngressIPs []IP `json:"ingressIPs"`

// machineNetworks are IP networks used to connect all the OpenShift cluster
// nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6,
// for example "10.0.0.0/8" or "fd00::/8".
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand All @@ -1412,7 +1423,8 @@ type VSpherePlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
APIServerInternalIPs []string `json:"apiServerInternalIPs"`

// ingressIP is an external IP which routes to the default ingress controller.
Expand All @@ -1428,7 +1440,8 @@ type VSpherePlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +listType=set
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=atomic
IngressIPs []string `json:"ingressIPs"`

// nodeDNSIP is the IP address for the internal DNS used by the
Expand All @@ -1447,8 +1460,9 @@ type VSpherePlatformStatus struct {
LoadBalancer *VSpherePlatformLoadBalancer `json:"loadBalancer,omitempty"`

// machineNetworks are IP networks used to connect all the OpenShift cluster nodes.
// +listType=set
// +listType=atomic
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))"
// +optional
MachineNetworks []CIDR `json:"machineNetworks"`
}
Expand Down Expand Up @@ -1813,6 +1827,7 @@ type NutanixPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="apiServerInternalIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
APIServerInternalIPs []string `json:"apiServerInternalIPs"`

Expand All @@ -1829,6 +1844,7 @@ type NutanixPlatformStatus struct {
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=2
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (size(self) == 2 && isIP(self[0]) && isIP(self[1]) ? ip(self[0]).family() != ip(self[1]).family() : true)",message="ingressIPs must contain at most one IPv4 address and at most one IPv6 address"
// +listType=set
IngressIPs []string `json:"ingressIPs"`

Expand Down
Loading

0 comments on commit ac9356b

Please sign in to comment.