Skip to content

Commit

Permalink
Merge pull request #291 from camba1/albIngressClass
Browse files Browse the repository at this point in the history
Feature/Allow creation of IngressClass for ALB
  • Loading branch information
shapirov103 authored Feb 9, 2022
2 parents 73d9e9f + c663c4f commit 1d3d8f2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/addons/aws-load-balancer-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ aws-load-balancer-controller 2/2 2
1. Adds proper IAM permissions and creates a Kubernetes service account with IRSA integration.
2. Allows configuration options such as enabling WAF and Shield.
3. Allows to replace the helm chart version if a specific version of the controller is needed.
4. Supports [standard helm configuration options](./index.md#standard-helm-add-on-configuration-options).
4. Creates an IngressClass associated with the AWS Load Balance Controller when the createIngressClassResource prop is set to true
5. Supports [standard helm configuration options](./index.md#standard-helm-add-on-configuration-options).

_Note_: An ingressClass must be created in the cluster, either using the createIngressClassResource prop or externally, to be able to create Ingresses associated with the AWS ALB.

## Creating a Load Balanced Service

Expand Down
21 changes: 18 additions & 3 deletions lib/addons/aws-loadbalancer-controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ export interface AwsLoadBalancerControllerProps extends HelmAddOnUserProps {
/**
* Enable WAFV2 (must be false for CN partition)
*/
enableWafv2?: boolean
enableWafv2?: boolean,

/**
* Create the ingressClass to be used by the ALB controller
*/
createIngressClassResource?: boolean

/**
* Name of ingressClass to the ALB controller will satisfy. If not provided
* the value will be defaulted to "alb"
*/
ingressClass?: string
}


Expand All @@ -37,10 +48,12 @@ const defaultProps: AwsLoadBalancerControllerProps = {
chart: AWS_LOAD_BALANCER_CONTROLLER,
repository: 'https://aws.github.io/eks-charts',
release: AWS_LOAD_BALANCER_CONTROLLER,
version: '1.2.3',
version: '1.3.3',
enableShield: false,
enableWaf: false,
enableWafv2: false
enableWafv2: false,
createIngressClassResource: true,
ingressClass: "alb"
};


Expand Down Expand Up @@ -74,6 +87,8 @@ export class AwsLoadBalancerControllerAddOn extends HelmAddOn {
enableShield: this.options.enableShield,
enableWaf: this.options.enableWaf,
enableWafv2: this.options.enableWafv2,
createIngressClassResource: this.options.createIngressClassResource,
ingressClass: this.options.ingressClass
});

awsLoadBalancerControllerChart.node.addDependency(serviceAccount);
Expand Down

0 comments on commit 1d3d8f2

Please sign in to comment.