Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions openapi/generated_openapi/zz_generated.openapi.go

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

17 changes: 16 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30893,6 +30893,16 @@
}
}
},
"com.github.openshift.api.operator.v1.OpenStackLoadBalancerParameters": {
"description": "OpenStackLoadBalancerParameters provides configuration settings that are specific to OpenStack load balancers.",
"type": "object",
"properties": {
"loadBalancerIP": {
"description": "loadBalancerIP specifies the floating IP address that the load balancer will use. When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. This value must be a valid IPv4 or IPv6 address.",
"type": "string"
}
}
},
"com.github.openshift.api.operator.v1.OperatorCondition": {
"description": "OperatorCondition is just the standard condition fields.",
"type": "object",
Expand Down Expand Up @@ -31172,6 +31182,10 @@
"description": "ibm provides configuration settings that are specific to IBM Cloud load balancers.\n\nIf empty, defaults will be applied. See specific ibm fields for details about their defaults.",
"$ref": "#/definitions/com.github.openshift.api.operator.v1.IBMLoadBalancerParameters"
},
"openstack": {
"description": "openstack provides configuration settings that are specific to OpenStack load balancers.\n\nIf empty, defaults will be applied. See specific openstack fields for details about their defaults.",
"$ref": "#/definitions/com.github.openshift.api.operator.v1.OpenStackLoadBalancerParameters"
},
"type": {
"description": "type is the underlying infrastructure provider for the load balancer. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"IBM\", \"Nutanix\", \"OpenStack\", and \"VSphere\".",
"type": "string",
Expand All @@ -31184,7 +31198,8 @@
"fields-to-discriminateBy": {
"aws": "AWS",
"gcp": "GCP",
"ibm": "IBM"
"ibm": "IBM",
"openstack": "OpenStack"
}
}
]
Expand Down
28 changes: 28 additions & 0 deletions operator/v1/types_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ const (

// ProviderLoadBalancerParameters holds desired load balancer information
// specific to the underlying infrastructure provider.
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'OpenStack' ? true : !has(self.openstack)",message="openstack is not permitted when type is not OpenStack"
// +union
type ProviderLoadBalancerParameters struct {
// type is the underlying infrastructure provider for the load balancer.
Expand Down Expand Up @@ -492,6 +493,15 @@ type ProviderLoadBalancerParameters struct {
//
// +optional
IBM *IBMLoadBalancerParameters `json:"ibm,omitempty"`

// openstack provides configuration settings that are specific to OpenStack
// load balancers.
//
// If empty, defaults will be applied. See specific openstack fields for
// details about their defaults.
//
// +optional
OpenStack *OpenStackLoadBalancerParameters `json:"openstack,omitempty"`
}

// LoadBalancerProviderType is the underlying infrastructure provider for the
Expand Down Expand Up @@ -665,6 +675,24 @@ type IBMLoadBalancerParameters struct {
Protocol IngressControllerProtocol `json:"protocol,omitempty"`
}

// OpenStackLoadBalancerParameters provides configuration settings that are
// specific to OpenStack load balancers.
type OpenStackLoadBalancerParameters struct {
// loadBalancerIP specifies the floating IP address that the load balancer will use.
// When not specified, an IP address will be assigned randomly by the OpenStack cloud provider.
// This value must be a valid IPv4 or IPv6 address.
// + ---
// + Note: this field is meant to be set by the ingress controller to populate the
// + `Service.Spec.LoadBalancerIP` field which has been deprecated in Kubernetes:
// + https://github.com/kubernetes/kubernetes/pull/107235
// + However, the field is still used by cloud-provider-openstack to reconcile
// + the floating IP that we attach to the load balancer.
//
// +kubebuilder:validation:XValidation:rule="isIP(self)",message="loadBalancerIP must be a valid IPv4 or IPv6 address"
// +optional
LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
}

// AWSClassicLoadBalancerParameters holds configuration parameters for an
// AWS Classic load balancer.
type AWSClassicLoadBalancerParameters struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,24 @@ spec:
- PROXY
type: string
type: object
openstack:
description: "openstack provides configuration settings
that are specific to OpenStack load balancers. \n If
empty, defaults will be applied. See specific openstack
fields for details about their defaults."
properties:
loadBalancerIP:
description: loadBalancerIP specifies the floating
IP address that the load balancer will use. When
not specified, an IP address will be assigned randomly
by the OpenStack cloud provider. This value must
be a valid IPv4 or IPv6 address.
type: string
x-kubernetes-validations:
- message: loadBalancerIP must be a valid IPv4 or
IPv6 address
rule: isIP(self)
type: object
type:
description: type is the underlying infrastructure provider
for the load balancer. Allowed values are "AWS", "Azure",
Expand All @@ -592,6 +610,10 @@ spec:
required:
- type
type: object
x-kubernetes-validations:
- message: openstack is not permitted when type is not OpenStack
rule: 'has(self.type) && self.type == ''OpenStack'' ? true
: !has(self.openstack)'
scope:
description: scope indicates the scope at which the load balancer
is exposed. Possible values are "External" and "Internal".
Expand Down Expand Up @@ -2458,6 +2480,24 @@ spec:
- PROXY
type: string
type: object
openstack:
description: "openstack provides configuration settings
that are specific to OpenStack load balancers. \n If
empty, defaults will be applied. See specific openstack
fields for details about their defaults."
properties:
loadBalancerIP:
description: loadBalancerIP specifies the floating
IP address that the load balancer will use. When
not specified, an IP address will be assigned randomly
by the OpenStack cloud provider. This value must
be a valid IPv4 or IPv6 address.
type: string
x-kubernetes-validations:
- message: loadBalancerIP must be a valid IPv4 or
IPv6 address
rule: isIP(self)
type: object
type:
description: type is the underlying infrastructure provider
for the load balancer. Allowed values are "AWS", "Azure",
Expand All @@ -2476,6 +2516,10 @@ spec:
required:
- type
type: object
x-kubernetes-validations:
- message: openstack is not permitted when type is not OpenStack
rule: 'has(self.type) && self.type == ''OpenStack'' ? true
: !has(self.openstack)'
scope:
description: scope indicates the scope at which the load balancer
is exposed. Possible values are "External" and "Internal".
Expand Down
21 changes: 21 additions & 0 deletions operator/v1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,24 @@ spec:
- PROXY
type: string
type: object
openstack:
description: "openstack provides configuration settings
that are specific to OpenStack load balancers. \n If
empty, defaults will be applied. See specific openstack
fields for details about their defaults."
properties:
loadBalancerIP:
description: loadBalancerIP specifies the floating
IP address that the load balancer will use. When
not specified, an IP address will be assigned randomly
by the OpenStack cloud provider. This value must
be a valid IPv4 or IPv6 address.
type: string
x-kubernetes-validations:
- message: loadBalancerIP must be a valid IPv4 or
IPv6 address
rule: isIP(self)
type: object
type:
description: type is the underlying infrastructure provider
for the load balancer. Allowed values are "AWS", "Azure",
Expand All @@ -385,6 +403,10 @@ spec:
required:
- type
type: object
x-kubernetes-validations:
- message: openstack is not permitted when type is not OpenStack
rule: 'has(self.type) && self.type == ''OpenStack'' ? true
: !has(self.openstack)'
scope:
description: scope indicates the scope at which the load balancer
is exposed. Possible values are "External" and "Internal".
Expand Down Expand Up @@ -2020,6 +2042,24 @@ spec:
- PROXY
type: string
type: object
openstack:
description: "openstack provides configuration settings
that are specific to OpenStack load balancers. \n If
empty, defaults will be applied. See specific openstack
fields for details about their defaults."
properties:
loadBalancerIP:
description: loadBalancerIP specifies the floating
IP address that the load balancer will use. When
not specified, an IP address will be assigned randomly
by the OpenStack cloud provider. This value must
be a valid IPv4 or IPv6 address.
type: string
x-kubernetes-validations:
- message: loadBalancerIP must be a valid IPv4 or
IPv6 address
rule: isIP(self)
type: object
type:
description: type is the underlying infrastructure provider
for the load balancer. Allowed values are "AWS", "Azure",
Expand All @@ -2038,6 +2078,10 @@ spec:
required:
- type
type: object
x-kubernetes-validations:
- message: openstack is not permitted when type is not OpenStack
rule: 'has(self.type) && self.type == ''OpenStack'' ? true
: !has(self.openstack)'
scope:
description: scope indicates the scope at which the load balancer
is exposed. Possible values are "External" and "Internal".
Expand Down
Loading