From f2c24f2092245000f4bcbb12efd3450de12b20d2 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Mon, 29 Jun 2020 15:17:07 -0700 Subject: [PATCH 1/2] Adds AWS Load Balancer Settings to EndpointPublishingStrategy API --- ...ess-operator_00-ingresscontroller.crd.yaml | 64 ++++++++++++++++++ operator/v1/types_ingress.go | 62 ++++++++++++++++++ operator/v1/zz_generated.deepcopy.go | 65 ++++++++++++++++++- .../v1/zz_generated.swagger_doc_generated.go | 28 ++++++++ 4 files changed, 218 insertions(+), 1 deletion(-) diff --git a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml index 66648561f08..2d668d7a35d 100644 --- a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml +++ b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml @@ -94,6 +94,38 @@ spec: description: loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService. properties: + aws: + description: "aws provides configuration settings that are specific + to AWS load balancers. \n If this field is empty, \"Classic\" + is used as the load balancer type." + properties: + awsClassicLoadBalancer: + description: awsClassicLoadBalancer holds configuration + parameters for an AWS Classic load balancer. Present only + if type is Classic. + type: object + awsNetworkLoadBalancer: + description: awsNetworkLoadBalancer holds configuration + parameters for an AWS Network load balancer. Present only + if type is NLB. + type: object + type: + description: "type is the AWS load balancer type to instantiate + for an ingresscontroller. \n Valid values are: \n * \"Classic\": + A Classic Load Balancer that makes routing decisions at + either the transport layer (TCP/SSL) or the application + layer (HTTP/HTTPS). See the following for additional + details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb + \n * \"NLB\": A Network Load Balancer that makes routing + decisions at the transport layer (TCP/SSL). See the + following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + enum: + - Classic + - NLB + type: string + required: + - type + type: object scope: description: scope indicates the scope at which the load balancer is exposed. Possible values are "External" and "Internal". @@ -634,6 +666,38 @@ spec: description: loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService. properties: + aws: + description: "aws provides configuration settings that are specific + to AWS load balancers. \n If this field is empty, \"Classic\" + is used as the load balancer type." + properties: + awsClassicLoadBalancer: + description: awsClassicLoadBalancer holds configuration + parameters for an AWS Classic load balancer. Present only + if type is Classic. + type: object + awsNetworkLoadBalancer: + description: awsNetworkLoadBalancer holds configuration + parameters for an AWS Network load balancer. Present only + if type is NLB. + type: object + type: + description: "type is the AWS load balancer type to instantiate + for an ingresscontroller. \n Valid values are: \n * \"Classic\": + A Classic Load Balancer that makes routing decisions at + either the transport layer (TCP/SSL) or the application + layer (HTTP/HTTPS). See the following for additional + details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb + \n * \"NLB\": A Network Load Balancer that makes routing + decisions at the transport layer (TCP/SSL). See the + following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + enum: + - Classic + - NLB + type: string + required: + - type + type: object scope: description: scope indicates the scope at which the load balancer is exposed. Possible values are "External" and "Internal". diff --git a/operator/v1/types_ingress.go b/operator/v1/types_ingress.go index f49bc433df4..090192fd935 100644 --- a/operator/v1/types_ingress.go +++ b/operator/v1/types_ingress.go @@ -233,6 +233,68 @@ type LoadBalancerStrategy struct { // +kubebuilder:validation:Required // +required Scope LoadBalancerScope `json:"scope"` + // aws provides configuration settings that are specific to AWS + // load balancers. + // + // If this field is empty, "Classic" is used as the load balancer + // type. + // + // +optional + AWS *AWSLoadBalancerParameters `json:"aws,omitempty"` +} + +// AWSLoadBalancerParameters provides configuration settings that are +// specific to AWS load balancers. +// +union +type AWSLoadBalancerParameters struct { + // type is the AWS load balancer type to instantiate for an ingresscontroller. + // + // Valid values are: + // + // * "Classic": A Classic Load Balancer that makes routing decisions at either + // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See + // the following for additional details: + // + // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb + // + // * "NLB": A Network Load Balancer that makes routing decisions at the + // transport layer (TCP/SSL). See the following for additional details: + // + // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb + // + // +unionDiscriminator + // +kubebuilder:validation:Required + // +required + Type AWSLoadBalancerType `json:"type"` + + // awsClassicLoadBalancer holds configuration parameters for an AWS + // Classic load balancer. Present only if type is Classic. + // +optional + AWSClassicLoadBalancer *AWSClassicLoadBalancerParameters `json:"awsClassicLoadBalancer,omitempty"` + + // awsNetworkLoadBalancer holds configuration parameters for an AWS + // Network load balancer. Present only if type is NLB. + // +optional + AWSNetworkLoadBalancer *AWSNetworkLoadBalancerParameters `json:"awsNetworkLoadBalancer,omitempty"` +} + +// AWSLoadBalancerType is the type of AWS load balancer to instantiate. +// +kubebuilder:validation:Enum=Classic;NLB +type AWSLoadBalancerType string + +const ( + AWSClassicLoadBalancer AWSLoadBalancerType = "Classic" + AWSNetworkLoadBalancer AWSLoadBalancerType = "NLB" +) + +// AWSClassicLoadBalancerParameters holds configuration parameters for an +// AWS Classic load balancer. +type AWSClassicLoadBalancerParameters struct { +} + +// AWSNetworkLoadBalancerParameters holds configuration parameters for an +// AWS Network load balancer. +type AWSNetworkLoadBalancerParameters struct { } // HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index 110dae102e7..55243de5dc9 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -11,6 +11,64 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSClassicLoadBalancerParameters) DeepCopyInto(out *AWSClassicLoadBalancerParameters) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSClassicLoadBalancerParameters. +func (in *AWSClassicLoadBalancerParameters) DeepCopy() *AWSClassicLoadBalancerParameters { + if in == nil { + return nil + } + out := new(AWSClassicLoadBalancerParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSLoadBalancerParameters) DeepCopyInto(out *AWSLoadBalancerParameters) { + *out = *in + if in.AWSClassicLoadBalancer != nil { + in, out := &in.AWSClassicLoadBalancer, &out.AWSClassicLoadBalancer + *out = new(AWSClassicLoadBalancerParameters) + **out = **in + } + if in.AWSNetworkLoadBalancer != nil { + in, out := &in.AWSNetworkLoadBalancer, &out.AWSNetworkLoadBalancer + *out = new(AWSNetworkLoadBalancerParameters) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSLoadBalancerParameters. +func (in *AWSLoadBalancerParameters) DeepCopy() *AWSLoadBalancerParameters { + if in == nil { + return nil + } + out := new(AWSLoadBalancerParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSNetworkLoadBalancerParameters) DeepCopyInto(out *AWSNetworkLoadBalancerParameters) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSNetworkLoadBalancerParameters. +func (in *AWSNetworkLoadBalancerParameters) DeepCopy() *AWSNetworkLoadBalancerParameters { + if in == nil { + return nil + } + out := new(AWSNetworkLoadBalancerParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AccessLogging) DeepCopyInto(out *AccessLogging) { *out = *in @@ -664,7 +722,7 @@ func (in *EndpointPublishingStrategy) DeepCopyInto(out *EndpointPublishingStrate if in.LoadBalancer != nil { in, out := &in.LoadBalancer, &out.LoadBalancer *out = new(LoadBalancerStrategy) - **out = **in + (*in).DeepCopyInto(*out) } if in.HostNetwork != nil { in, out := &in.HostNetwork, &out.HostNetwork @@ -1479,6 +1537,11 @@ func (in *KuryrConfig) DeepCopy() *KuryrConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) { *out = *in + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(AWSLoadBalancerParameters) + (*in).DeepCopyInto(*out) + } return } diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 51f5a3cf1d2..0445995b51b 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -329,6 +329,33 @@ func (EtcdList) SwaggerDoc() map[string]string { return map_EtcdList } +var map_AWSClassicLoadBalancerParameters = map[string]string{ + "": "AWSClassicLoadBalancerParameters holds configuration parameters for an AWS Classic load balancer.", +} + +func (AWSClassicLoadBalancerParameters) SwaggerDoc() map[string]string { + return map_AWSClassicLoadBalancerParameters +} + +var map_AWSLoadBalancerParameters = map[string]string{ + "": "AWSLoadBalancerParameters provides configuration settings that are specific to AWS load balancers.", + "type": "type is the AWS load balancer type to instantiate for an ingresscontroller.\n\nValid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb", + "awsClassicLoadBalancer": "awsClassicLoadBalancer holds configuration parameters for an AWS Classic load balancer. Present only if type is Classic.", + "awsNetworkLoadBalancer": "awsNetworkLoadBalancer holds configuration parameters for an AWS Network load balancer. Present only if type is NLB.", +} + +func (AWSLoadBalancerParameters) SwaggerDoc() map[string]string { + return map_AWSLoadBalancerParameters +} + +var map_AWSNetworkLoadBalancerParameters = map[string]string{ + "": "AWSNetworkLoadBalancerParameters holds configuration parameters for an AWS Network load balancer.", +} + +func (AWSNetworkLoadBalancerParameters) SwaggerDoc() map[string]string { + return map_AWSNetworkLoadBalancerParameters +} + var map_AccessLogging = map[string]string{ "": "AccessLogging describes how client requests should be logged.", "destination": "destination is where access logs go.", @@ -431,6 +458,7 @@ func (IngressControllerStatus) SwaggerDoc() map[string]string { var map_LoadBalancerStrategy = map[string]string{ "": "LoadBalancerStrategy holds parameters for a load balancer.", "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".", + "aws": "aws provides configuration settings that are specific to AWS load balancers.\n\nIf this field is empty, \"Classic\" is used as the load balancer type.", } func (LoadBalancerStrategy) SwaggerDoc() map[string]string { From 3e682c011453d6596dd2a2be64024b61ad184ce0 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Tue, 14 Jul 2020 18:07:37 -0700 Subject: [PATCH 2/2] Incorporates feedback from deads2k --- ...ess-operator_00-ingresscontroller.crd.yaml | 140 ++++++++++++------ operator/v1/types_ingress.go | 51 +++++-- operator/v1/zz_generated.deepcopy.go | 35 +++-- .../v1/zz_generated.swagger_doc_generated.go | 24 ++- 4 files changed, 177 insertions(+), 73 deletions(-) diff --git a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml index 2d668d7a35d..0c95e3a6d35 100644 --- a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml +++ b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml @@ -94,34 +94,56 @@ spec: description: loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService. properties: - aws: - description: "aws provides configuration settings that are specific - to AWS load balancers. \n If this field is empty, \"Classic\" - is used as the load balancer type." + providerParameters: + description: "providerParameters holds desired load balancer + information specific to the underlying infrastructure provider. + \n If empty, defaults will be applied. See specific providerParameters + fields for details about their defaults." properties: - awsClassicLoadBalancer: - description: awsClassicLoadBalancer holds configuration - parameters for an AWS Classic load balancer. Present only - if type is Classic. - type: object - awsNetworkLoadBalancer: - description: awsNetworkLoadBalancer holds configuration - parameters for an AWS Network load balancer. Present only - if type is NLB. + aws: + description: "aws provides configuration settings that are + specific to AWS load balancers. \n If empty, defaults + will be applied. See specific aws fields for details about + their defaults." + properties: + classicLoadBalancer: + description: classicLoadBalancerParameters holds configuration + parameters for an AWS classic load balancer. Present + only if type is Classic. + type: object + networkLoadBalancer: + description: networkLoadBalancerParameters holds configuration + parameters for an AWS network load balancer. Present + only if type is NLB. + type: object + type: + description: "type is the type of AWS load balancer + to instantiate for an ingresscontroller. \n Valid + values are: \n * \"Classic\": A Classic Load Balancer + that makes routing decisions at either the transport + layer (TCP/SSL) or the application layer (HTTP/HTTPS). + See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb + \n * \"NLB\": A Network Load Balancer that makes routing + decisions at the transport layer (TCP/SSL). See + the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + enum: + - Classic + - NLB + type: string + required: + - type type: object type: - description: "type is the AWS load balancer type to instantiate - for an ingresscontroller. \n Valid values are: \n * \"Classic\": - A Classic Load Balancer that makes routing decisions at - either the transport layer (TCP/SSL) or the application - layer (HTTP/HTTPS). See the following for additional - details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - \n * \"NLB\": A Network Load Balancer that makes routing - decisions at the transport layer (TCP/SSL). See the - following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + description: type is the underlying infrastructure provider + for the load balancer. Allowed values are "AWS", "Azure", + "BareMetal", "GCP", "OpenStack", and "VSphere". enum: - - Classic - - NLB + - AWS + - Azure + - BareMetal + - GCP + - OpenStack + - VSphere type: string required: - type @@ -666,34 +688,56 @@ spec: description: loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService. properties: - aws: - description: "aws provides configuration settings that are specific - to AWS load balancers. \n If this field is empty, \"Classic\" - is used as the load balancer type." + providerParameters: + description: "providerParameters holds desired load balancer + information specific to the underlying infrastructure provider. + \n If empty, defaults will be applied. See specific providerParameters + fields for details about their defaults." properties: - awsClassicLoadBalancer: - description: awsClassicLoadBalancer holds configuration - parameters for an AWS Classic load balancer. Present only - if type is Classic. - type: object - awsNetworkLoadBalancer: - description: awsNetworkLoadBalancer holds configuration - parameters for an AWS Network load balancer. Present only - if type is NLB. + aws: + description: "aws provides configuration settings that are + specific to AWS load balancers. \n If empty, defaults + will be applied. See specific aws fields for details about + their defaults." + properties: + classicLoadBalancer: + description: classicLoadBalancerParameters holds configuration + parameters for an AWS classic load balancer. Present + only if type is Classic. + type: object + networkLoadBalancer: + description: networkLoadBalancerParameters holds configuration + parameters for an AWS network load balancer. Present + only if type is NLB. + type: object + type: + description: "type is the type of AWS load balancer + to instantiate for an ingresscontroller. \n Valid + values are: \n * \"Classic\": A Classic Load Balancer + that makes routing decisions at either the transport + layer (TCP/SSL) or the application layer (HTTP/HTTPS). + See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb + \n * \"NLB\": A Network Load Balancer that makes routing + decisions at the transport layer (TCP/SSL). See + the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + enum: + - Classic + - NLB + type: string + required: + - type type: object type: - description: "type is the AWS load balancer type to instantiate - for an ingresscontroller. \n Valid values are: \n * \"Classic\": - A Classic Load Balancer that makes routing decisions at - either the transport layer (TCP/SSL) or the application - layer (HTTP/HTTPS). See the following for additional - details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - \n * \"NLB\": A Network Load Balancer that makes routing - decisions at the transport layer (TCP/SSL). See the - following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" + description: type is the underlying infrastructure provider + for the load balancer. Allowed values are "AWS", "Azure", + "BareMetal", "GCP", "OpenStack", and "VSphere". enum: - - Classic - - NLB + - AWS + - Azure + - BareMetal + - GCP + - OpenStack + - VSphere type: string required: - type diff --git a/operator/v1/types_ingress.go b/operator/v1/types_ingress.go index 090192fd935..97be3ea631c 100644 --- a/operator/v1/types_ingress.go +++ b/operator/v1/types_ingress.go @@ -233,21 +233,52 @@ type LoadBalancerStrategy struct { // +kubebuilder:validation:Required // +required Scope LoadBalancerScope `json:"scope"` + + // providerParameters holds desired load balancer information specific to + // the underlying infrastructure provider. + // + // If empty, defaults will be applied. See specific providerParameters + // fields for details about their defaults. + // + // +optional + ProviderParameters ProviderLoadBalancerParameters `json:"providerParameters,omitempty"` +} + +// ProviderLoadBalancerParameters holds desired load balancer information +// specific to the underlying infrastructure provider. +// +union +type ProviderLoadBalancerParameters struct { + // type is the underlying infrastructure provider for the load balancer. + // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "OpenStack", + // and "VSphere". + // + // +unionDiscriminator + // +kubebuilder:validation:Required + // +required + Type LoadBalancerProviderType `json:"type"` + // aws provides configuration settings that are specific to AWS // load balancers. // - // If this field is empty, "Classic" is used as the load balancer - // type. + // If empty, defaults will be applied. See specific aws fields for + // details about their defaults. // // +optional AWS *AWSLoadBalancerParameters `json:"aws,omitempty"` } +// LoadBalancerProviderType is the underlying infrastructure provider for the +// load balancer. Allowed values are "AWS", "Azure", "BareMetal", "GCP", +// "OpenStack", and "VSphere". +// +// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;OpenStack;VSphere +type LoadBalancerProviderType string + // AWSLoadBalancerParameters provides configuration settings that are // specific to AWS load balancers. // +union type AWSLoadBalancerParameters struct { - // type is the AWS load balancer type to instantiate for an ingresscontroller. + // type is the type of AWS load balancer to instantiate for an ingresscontroller. // // Valid values are: // @@ -267,15 +298,17 @@ type AWSLoadBalancerParameters struct { // +required Type AWSLoadBalancerType `json:"type"` - // awsClassicLoadBalancer holds configuration parameters for an AWS - // Classic load balancer. Present only if type is Classic. + // classicLoadBalancerParameters holds configuration parameters for an AWS + // classic load balancer. Present only if type is Classic. + // // +optional - AWSClassicLoadBalancer *AWSClassicLoadBalancerParameters `json:"awsClassicLoadBalancer,omitempty"` + ClassicLoadBalancerParameters *AWSClassicLoadBalancerParameters `json:"classicLoadBalancer,omitempty"` - // awsNetworkLoadBalancer holds configuration parameters for an AWS - // Network load balancer. Present only if type is NLB. + // networkLoadBalancerParameters holds configuration parameters for an AWS + // network load balancer. Present only if type is NLB. + // // +optional - AWSNetworkLoadBalancer *AWSNetworkLoadBalancerParameters `json:"awsNetworkLoadBalancer,omitempty"` + NetworkLoadBalancerParameters *AWSNetworkLoadBalancerParameters `json:"networkLoadBalancer,omitempty"` } // AWSLoadBalancerType is the type of AWS load balancer to instantiate. diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index 55243de5dc9..2e1c140b8eb 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -30,13 +30,13 @@ func (in *AWSClassicLoadBalancerParameters) DeepCopy() *AWSClassicLoadBalancerPa // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AWSLoadBalancerParameters) DeepCopyInto(out *AWSLoadBalancerParameters) { *out = *in - if in.AWSClassicLoadBalancer != nil { - in, out := &in.AWSClassicLoadBalancer, &out.AWSClassicLoadBalancer + if in.ClassicLoadBalancerParameters != nil { + in, out := &in.ClassicLoadBalancerParameters, &out.ClassicLoadBalancerParameters *out = new(AWSClassicLoadBalancerParameters) **out = **in } - if in.AWSNetworkLoadBalancer != nil { - in, out := &in.AWSNetworkLoadBalancer, &out.AWSNetworkLoadBalancer + if in.NetworkLoadBalancerParameters != nil { + in, out := &in.NetworkLoadBalancerParameters, &out.NetworkLoadBalancerParameters *out = new(AWSNetworkLoadBalancerParameters) **out = **in } @@ -1537,11 +1537,7 @@ func (in *KuryrConfig) DeepCopy() *KuryrConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) { *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSLoadBalancerParameters) - (*in).DeepCopyInto(*out) - } + in.ProviderParameters.DeepCopyInto(&out.ProviderParameters) return } @@ -2178,6 +2174,27 @@ func (in *PrivateStrategy) DeepCopy() *PrivateStrategy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProviderLoadBalancerParameters) DeepCopyInto(out *ProviderLoadBalancerParameters) { + *out = *in + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(AWSLoadBalancerParameters) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderLoadBalancerParameters. +func (in *ProviderLoadBalancerParameters) DeepCopy() *ProviderLoadBalancerParameters { + if in == nil { + return nil + } + out := new(ProviderLoadBalancerParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in ProxyArgumentList) DeepCopyInto(out *ProxyArgumentList) { { diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 0445995b51b..56995fbca8b 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -338,10 +338,10 @@ func (AWSClassicLoadBalancerParameters) SwaggerDoc() map[string]string { } var map_AWSLoadBalancerParameters = map[string]string{ - "": "AWSLoadBalancerParameters provides configuration settings that are specific to AWS load balancers.", - "type": "type is the AWS load balancer type to instantiate for an ingresscontroller.\n\nValid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb", - "awsClassicLoadBalancer": "awsClassicLoadBalancer holds configuration parameters for an AWS Classic load balancer. Present only if type is Classic.", - "awsNetworkLoadBalancer": "awsNetworkLoadBalancer holds configuration parameters for an AWS Network load balancer. Present only if type is NLB.", + "": "AWSLoadBalancerParameters provides configuration settings that are specific to AWS load balancers.", + "type": "type is the type of AWS load balancer to instantiate for an ingresscontroller.\n\nValid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb", + "classicLoadBalancer": "classicLoadBalancerParameters holds configuration parameters for an AWS classic load balancer. Present only if type is Classic.", + "networkLoadBalancer": "networkLoadBalancerParameters holds configuration parameters for an AWS network load balancer. Present only if type is NLB.", } func (AWSLoadBalancerParameters) SwaggerDoc() map[string]string { @@ -456,9 +456,9 @@ func (IngressControllerStatus) SwaggerDoc() map[string]string { } var map_LoadBalancerStrategy = map[string]string{ - "": "LoadBalancerStrategy holds parameters for a load balancer.", - "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".", - "aws": "aws provides configuration settings that are specific to AWS load balancers.\n\nIf this field is empty, \"Classic\" is used as the load balancer type.", + "": "LoadBalancerStrategy holds parameters for a load balancer.", + "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".", + "providerParameters": "providerParameters holds desired load balancer information specific to the underlying infrastructure provider.\n\nIf empty, defaults will be applied. See specific providerParameters fields for details about their defaults.", } func (LoadBalancerStrategy) SwaggerDoc() map[string]string { @@ -502,6 +502,16 @@ func (PrivateStrategy) SwaggerDoc() map[string]string { return map_PrivateStrategy } +var map_ProviderLoadBalancerParameters = map[string]string{ + "": "ProviderLoadBalancerParameters holds desired load balancer information specific to the underlying infrastructure provider.", + "type": "type is the underlying infrastructure provider for the load balancer. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"OpenStack\", and \"VSphere\".", + "aws": "aws provides configuration settings that are specific to AWS load balancers.\n\nIf empty, defaults will be applied. See specific aws fields for details about their defaults.", +} + +func (ProviderLoadBalancerParameters) SwaggerDoc() map[string]string { + return map_ProviderLoadBalancerParameters +} + var map_RouteAdmissionPolicy = map[string]string{ "": "RouteAdmissionPolicy is an admission policy for allowing new route claims.", "namespaceOwnership": "namespaceOwnership describes how host name claims across namespaces should be handled.\n\nValue must be one of:\n\n- Strict: Do not allow routes in different namespaces to claim the same host.\n\n- InterNamespaceAllowed: Allow routes to claim different paths of the same\n host name across namespaces.\n\nIf empty, the default is Strict.",