Skip to content

Commit

Permalink
Create ingressclass object if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lazouz committed Sep 24, 2021
1 parent 92445ac commit f3c2880
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/aws-load-balancer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ The default values set by the application itself can be confirmed [here](https:/
| `serviceAccount.name` | Service account to be used | None |
| `terminationGracePeriodSeconds` | Time period for controller pod to do a graceful shutdown | 10 |
| `ingressClass` | The ingress class to satisfy | alb |
| `createIngressClassResource` | Create ingressClass resource | false |
| `region` | The AWS region for the kubernetes cluster | None |
| `vpcId` | The VPC ID for the Kubernetes cluster | None |
| `awsMaxRetries` | Maximum retries for AWS APIs | None |
Expand Down
10 changes: 10 additions & 0 deletions helm/aws-load-balancer-controller/templates/ingressclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.createIngressClassResource }}
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: {{ .Values.ingressClass }}
labels:
{{- include "aws-load-balancer-controller.labels" . | nindent 4 }}
spec:
controller: ingress.k8s.aws/alb
{{- end }}
4 changes: 4 additions & 0 deletions helm/aws-load-balancer-controller/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ enableCertManager: false
# ingresses without ingress class annotation and ingresses of type alb
ingressClass: alb

# To use IngressClass resource instead of annotation, before you need to install the IngressClass resource pointing to controller.
# If specified as true, the IngressClass resource will be created.
createIngressClassResource: true

# The AWS region for the kubernetes cluster. Set to use KIAM or kube2iam for example.
region:

Expand Down
4 changes: 4 additions & 0 deletions helm/aws-load-balancer-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ enableCertManager: false
# ingresses without ingress class annotation and ingresses of type alb
ingressClass: alb

# To use IngressClass resource instead of annotation, before you need to install the IngressClass resource pointing to controller.
# If specified as true, the IngressClass resource will be created.
createIngressClassResource: false

# The AWS region for the kubernetes cluster. Set to use KIAM or kube2iam for example.
region:

Expand Down

0 comments on commit f3c2880

Please sign in to comment.