diff --git a/chart/README.md b/chart/README.md index c0d7847624680..8be25a2a0259f 100644 --- a/chart/README.md +++ b/chart/README.md @@ -181,6 +181,7 @@ The following tables lists the configurable parameters of the Airflow chart and | `scheduler.resources.requests.memory` | Memory Request of scheduler | `~` | | `scheduler.airflowLocalSettings` | Custom Airflow local settings python file | `~` | | `scheduler.safeToEvict` | Allow Kubernetes to evict scheduler pods if needed (node downscaling) | `true` | +| `webserver.baseUrl` | The base url of the website | `~` | | `webserver.livenessProbe.initialDelaySeconds` | Webserver LivenessProbe initial delay | `15` | | `webserver.livenessProbe.timeoutSeconds` | Webserver LivenessProbe timeout seconds | `30` | | `webserver.livenessProbe.failureThreshold` | Webserver LivenessProbe failure threshold | `20` | diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml index 833d6e2072d22..d1fdf8a48beca 100644 --- a/chart/templates/_helpers.yaml +++ b/chart/templates/_helpers.yaml @@ -91,6 +91,10 @@ value: {{ printf "%s=%s" $config.secretName $config.secretKey }} {{- end }} {{ end }} + {{- if .Values.webserver.baseUrl }} + - name: AIRFLOW__WEBSERVER__BASE_URL + value: {{ .Values.webserver.baseUrl }} + {{ end }} {{- end }} {{/* Git ssh key volume */}} diff --git a/chart/templates/webserver/webserver-deployment.yaml b/chart/templates/webserver/webserver-deployment.yaml index fe7dee5ee6b88..cdbb265235688 100644 --- a/chart/templates/webserver/webserver-deployment.yaml +++ b/chart/templates/webserver/webserver-deployment.yaml @@ -121,7 +121,7 @@ spec: containerPort: {{ .Values.ports.airflowUI }} livenessProbe: httpGet: - path: /health + path: {{ if .Values.webserver.baseUrl }}{{ with urlParse .Values.webserver.baseUrl }}{{ index . "path" }}{{ end }}{{ end }}/health port: {{ .Values.ports.airflowUI }} initialDelaySeconds: {{ .Values.webserver.livenessProbe.initialDelaySeconds | default 15 }} timeoutSeconds: {{ .Values.webserver.livenessProbe.timeoutSeconds | default 30 }} @@ -129,7 +129,7 @@ spec: periodSeconds: {{ .Values.webserver.livenessProbe.periodSeconds | default 5 }} readinessProbe: httpGet: - path: /health + path: {{ if .Values.webserver.baseUrl }}{{ with urlParse .Values.webserver.baseUrl }}{{ index . "path" }}{{ end }}{{ end }}/health port: {{ .Values.ports.airflowUI }} initialDelaySeconds: {{ .Values.webserver.readinessProbe.initialDelaySeconds | default 15 }} timeoutSeconds: {{ .Values.webserver.readinessProbe.timeoutSeconds | default 30 }} diff --git a/chart/values.yaml b/chart/values.yaml index f0d5fa4cb9df1..b2e20047de7f3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -260,6 +260,9 @@ webserver: service: type: ClusterIP + # The base url of the website. Also sets the AIRFLOW__WEBSERVER__BASE_URL variable. + # baseUrl: "" + # Flower settings flower: # Additional network policies as needed