Skip to content

Commit

Permalink
Adds AWS Load Balancer Settings to EndpointPublishingStrategy API
Browse files Browse the repository at this point in the history
  • Loading branch information
danehans committed Jul 13, 2020
1 parent 784a0be commit 61d6d39
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 1 deletion.
44 changes: 44 additions & 0 deletions operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
Expand Up @@ -94,6 +94,28 @@ 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:
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".
Expand Down Expand Up @@ -634,6 +656,28 @@ 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:
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".
Expand Down
42 changes: 42 additions & 0 deletions operator/v1/types_ingress.go
Expand Up @@ -233,8 +233,50 @@ 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"`
}

// 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"
)

// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing
// strategy.
type HostNetworkStrategy struct {
Expand Down
23 changes: 22 additions & 1 deletion operator/v1/zz_generated.deepcopy.go

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

10 changes: 10 additions & 0 deletions operator/v1/zz_generated.swagger_doc_generated.go

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

0 comments on commit 61d6d39

Please sign in to comment.