Skip to content

Commit

Permalink
Incorporates feedback from deads2k
Browse files Browse the repository at this point in the history
  • Loading branch information
danehans committed Jul 15, 2020
1 parent f2c24f2 commit 3e682c0
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 73 deletions.
140 changes: 92 additions & 48 deletions operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
51 changes: 42 additions & 9 deletions operator/v1/types_ingress.go
Expand Up @@ -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:
//
Expand All @@ -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.
Expand Down
35 changes: 26 additions & 9 deletions operator/v1/zz_generated.deepcopy.go

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

0 comments on commit 3e682c0

Please sign in to comment.