Skip to content

Commit

Permalink
feat: add ingressClassName to web/flower ingress
Browse files Browse the repository at this point in the history
Signed-off-by: fkoetzner <florian.koetzner@baeckerai.de>
  • Loading branch information
fkoetzner committed Feb 23, 2022
1 parent df99a33 commit 06b4d8e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
12 changes: 7 additions & 5 deletions charts/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ Consider the situation where you already have something hosted at the root of yo
- http://example.com/airflow/
- http://example.com/airflow/flower

In this example, would set these values:
In this example, you would set these values, assuming you have an Ingress Controller with an IngressClass named "nginx" deployed:
```yaml
airflow:
config:
Expand All @@ -1250,17 +1250,19 @@ ingress:
## airflow webserver ingress configs
web:
annotations:
kubernetes.io/ingress.class: nginx
annotations: {}
host: "example.com"
path: "/airflow"
## WARNING: requires Kubernetes 1.18 or later, use "kubernetes.io/ingress.class" annotation for older versions
ingressClassName: "nginx"
## flower ingress configs
flower:
annotations:
kubernetes.io/ingress.class: nginx
annotations: {}
host: "example.com"
path: "/airflow/flower"
## WARNING: requires Kubernetes 1.18 or later, use "kubernetes.io/ingress.class" annotation for older versions
ingressClassName: "nginx"
```

We expose the `ingress.web.precedingPaths` and `ingress.web.succeedingPaths` values, which are __before__ and __after__ the default path respectively.
Expand Down
3 changes: 3 additions & 0 deletions charts/airflow/templates/flower/flower-ingress-v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
secretName: {{ .Values.ingress.flower.tls.secretName }}
{{- end }}
{{- end }}
{{- if .Values.ingress.flower.ingressClassName }}
ingressClassName: {{ .Values.ingress.flower.ingressClassName }}
{{- end }}
rules:
- host: {{ .Values.ingress.flower.host }}
http:
Expand Down
3 changes: 3 additions & 0 deletions charts/airflow/templates/flower/flower-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
secretName: {{ .Values.ingress.flower.tls.secretName }}
{{- end }}
{{- end }}
{{- if .Values.ingress.flower.ingressClassName }}
ingressClassName: {{ .Values.ingress.flower.ingressClassName }}
{{- end }}
rules:
- host: {{ .Values.ingress.flower.host }}
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
secretName: {{ .Values.ingress.web.tls.secretName }}
{{- end }}
{{- end }}
{{- if .Values.ingress.web.ingressClassName }}
ingressClassName: {{ .Values.ingress.web.ingressClassName }}
{{- end }}
rules:
- host: {{ .Values.ingress.web.host }}
http:
Expand Down
3 changes: 3 additions & 0 deletions charts/airflow/templates/webserver/webserver-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
secretName: {{ .Values.ingress.web.tls.secretName }}
{{- end }}
{{- end }}
{{- if .Values.ingress.web.ingressClassName }}
ingressClassName: {{ .Values.ingress.web.ingressClassName }}
{{- end }}
rules:
- host: {{ .Values.ingress.web.host }}
http:
Expand Down
10 changes: 10 additions & 0 deletions charts/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,11 @@ ingress:
##
host: ""

## the Ingress Class for the web Ingress
## - [WARNING] requires Kubernetes 1.18 or later, use "kubernetes.io/ingress.class" annotation for older versions
##
ingressClassName: ""

## configs for web Ingress TLS
##
tls:
Expand Down Expand Up @@ -1258,6 +1263,11 @@ ingress:
##
host: ""

## the Ingress Class for the flower Ingress
## - [WARNING] requires Kubernetes 1.18 or later, use "kubernetes.io/ingress.class" annotation for older versions
##
ingressClassName: ""

## configs for flower Ingress TLS
##
tls:
Expand Down

0 comments on commit 06b4d8e

Please sign in to comment.