Skip to content

Commit

Permalink
Adds Load Balancer Type to IngressController API
Browse files Browse the repository at this point in the history
  • Loading branch information
danehans committed Jun 10, 2020
1 parent dca6375 commit 39bfb7b
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
24 changes: 24 additions & 0 deletions operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
Expand Up @@ -101,6 +101,18 @@ spec:
- Internal
- External
type: string
type:
description: "type indicates the type of load balancer to instantiate.
Possible values are based on .status.platform of infrastructure.config.openshift.io/cluster:
\n AWS: AWSClassicLB (default), AWSNetworkLB Azure:
\ AzureStandardLB GCP: GCPNetworkLB IBMCloud: IBMCloudLB"
enum:
- AWSClassicLB
- AWSNetworkLB
- AzureStandardLB
- GCPNetworkLB
- IBMCloudLB
type: string
required:
- scope
type: object
Expand Down Expand Up @@ -641,6 +653,18 @@ spec:
- Internal
- External
type: string
type:
description: "type indicates the type of load balancer to instantiate.
Possible values are based on .status.platform of infrastructure.config.openshift.io/cluster:
\n AWS: AWSClassicLB (default), AWSNetworkLB Azure:
\ AzureStandardLB GCP: GCPNetworkLB IBMCloud: IBMCloudLB"
enum:
- AWSClassicLB
- AWSNetworkLB
- AzureStandardLB
- GCPNetworkLB
- IBMCloudLB
type: string
required:
- scope
type: object
Expand Down
49 changes: 49 additions & 0 deletions operator/v1/types_ingress.go
Expand Up @@ -225,8 +225,57 @@ var (
ExternalLoadBalancer LoadBalancerScope = "External"
)

// LoadBalancerType is the type of load balancer to instantiate.
// +kubebuilder:validation:Enum=AWSClassicLB;AWSNetworkLB;AzureStandardLB;GCPNetworkLB;IBMCloudLB
type LoadBalancerType string

var (
// AWSClassicLoadBalancer is an AWS Classic Load Balancer:
//
// https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html
//
AWSClassicLoadBalancer LoadBalancerType = "AWSClassicLB"

// AWSNetworkLoadBalancer is an AWS Network Load Balancer:
//
// https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html
//
AWSNetworkLoadBalancer LoadBalancerType = "AWSNetworkLB"

// AzureStandardLoadBalancer is an Azure Standard Load Balancer:
//
// https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview
//
AzureStandardLoadBalancer LoadBalancerType = "AzureStandardLB"

// GCPNetworkLoadBalancer is a GCP Network Load Balancer:
//
// https://cloud.google.com/load-balancing/docs/network
//
GCPNetworkLoadBalancer LoadBalancerType = "GCPNetworkLB"

// IBMCloudLoadBalancer is an IBM Cloud Load Balancer:
//
// https://cloud.ibm.com/docs/loadbalancer-service
//
IBMCloudLoadBalancer LoadBalancerType = "IBMCloudLB"
)

// LoadBalancerStrategy holds parameters for a load balancer.
type LoadBalancerStrategy struct {
// type indicates the type of load balancer to instantiate.
// Possible values are based on .status.platform of
// infrastructure.config.openshift.io/cluster:
//
// AWS: AWSClassicLB (default), AWSNetworkLB
// Azure: AzureStandardLB
// GCP: GCPNetworkLB
// IBMCloud: IBMCloudLB
//
// +kubebuilder:validation:Optional
// +optional
Type *LoadBalancerType `json:"type,omitempty"`

// scope indicates the scope at which the load balancer is exposed.
// Possible values are "External" and "Internal".
//
Expand Down
7 changes: 6 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.

1 change: 1 addition & 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 39bfb7b

Please sign in to comment.