From 15f4c07a6c95bceca509cd323751865c8cc853d5 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Wed, 3 Jun 2026 10:26:38 -0500 Subject: [PATCH 01/20] Create webserver-virtualservice.yaml add vs for webserver --- .../webserver/webserver-virtualservice.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 templates/webserver/webserver-virtualservice.yaml diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml new file mode 100644 index 00000000..3b9ad681 --- /dev/null +++ b/templates/webserver/webserver-virtualservice.yaml @@ -0,0 +1,70 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/}} + +################################ +## Airflow Webserver VirtualService +################################# +{{- if .Values.airflow.istio.enabled }} +{{- $fullname := include "airflow.fullname" . }} +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: {{ $fullname }}-webserver-virtualservice + labels: + tier: airflow + component: webserver-virtualservice + release: {{ .Release.Name }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service }} + {{- with .Values.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.webserver.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.webserver.annotations }} + annotations: {{- toYaml .Values.webserver.annotations | nindent 4 }} + {{- end }} +spec: + hosts: + {{- range .Values.istio.hosts }} + - {{ . | quote }} + {{- end }} + gateways: + - {{ .Values.istio.gateway }} + http: + # Webserver routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/airflow" + rewrite: + uri: "/airflow" + route: + - destination: + host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local + port: + number: {{ .Values.ports.airflowUI }} + {{- if .Values.istio.virtualService.timeout }} + timeout: {{ .Values.istio.virtualService.timeout }} + {{- end }} + {{- if .Values.istio.virtualService.retries }} + retries: + {{- toYaml .Values.istio.virtualService.retries | nindent 6 }} + {{- end }} +{{- end }} From 016b2b5485098e2ee9b66e42e3e0fa1342469dc3 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Wed, 3 Jun 2026 10:28:37 -0500 Subject: [PATCH 02/20] Update values.yaml --- values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/values.yaml b/values.yaml index 1c2a6545..9223ca9a 100644 --- a/values.yaml +++ b/values.yaml @@ -3,6 +3,8 @@ # Declare variables to be passed into your templates. airflow: + istio: + enabled: false # group of airflow user gid: 50000 From 1cff18665523dbfb91581fccec1d6b5374f2d6e7 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Wed, 3 Jun 2026 10:40:59 -0500 Subject: [PATCH 03/20] Update webserver-virtualservice.yaml --- .../webserver/webserver-virtualservice.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 3b9ad681..ebad7f9b 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -35,19 +35,19 @@ metadata: {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} - {{- with .Values.webserver.labels }} + {{- with .Values.airflow.webserver.labels }} {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.webserver.annotations }} - annotations: {{- toYaml .Values.webserver.annotations | nindent 4 }} + {{- if .Values.airflow.webserver.annotations }} + annotations: {{- toYaml .Values.airflow.webserver.annotations | nindent 4 }} {{- end }} spec: hosts: - {{- range .Values.istio.hosts }} + {{- range .Values.airflow.istio.hosts }} - {{ . | quote }} {{- end }} gateways: - - {{ .Values.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} http: # Webserver routes - match: @@ -59,12 +59,12 @@ spec: - destination: host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local port: - number: {{ .Values.ports.airflowUI }} - {{- if .Values.istio.virtualService.timeout }} - timeout: {{ .Values.istio.virtualService.timeout }} + number: {{ .Values.airflow.ports.airflowUI }} + {{- if .Values.airflow.istio.virtualService.timeout }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} {{- end }} - {{- if .Values.istio.virtualService.retries }} + {{- if .Values.airflow.istio.virtualService.retries }} retries: - {{- toYaml .Values.istio.virtualService.retries | nindent 6 }} + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} {{- end }} {{- end }} From cb3a8c5b20b83a33e7408ed99edc6def5dd1fa81 Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:31:27 +0530 Subject: [PATCH 04/20] Update values.yaml --- values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/values.yaml b/values.yaml index 9223ca9a..bed5f107 100644 --- a/values.yaml +++ b/values.yaml @@ -3,6 +3,7 @@ # Declare variables to be passed into your templates. airflow: + # istio config istio: enabled: false # group of airflow user From 0ccab1f05a23c708e1558ebc56e45eb0581660c6 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Thu, 4 Jun 2026 19:07:44 +0530 Subject: [PATCH 05/20] fix the tpl --- templates/webserver/webserver-virtualservice.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index ebad7f9b..3399c034 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -60,10 +60,10 @@ spec: host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local port: number: {{ .Values.airflow.ports.airflowUI }} - {{- if .Values.airflow.istio.virtualService.timeout }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} timeout: {{ .Values.airflow.istio.virtualService.timeout }} {{- end }} - {{- if .Values.airflow.istio.virtualService.retries }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} retries: {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} {{- end }} From b70b4aa62ef3fe50e4a159ecdbfc5dd67fd43b7e Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Thu, 4 Jun 2026 19:09:06 +0530 Subject: [PATCH 06/20] fix the tpl --- templates/webserver/webserver-virtualservice.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 3399c034..9ce2f5bd 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -43,11 +43,15 @@ metadata: {{- end }} spec: hosts: + {{- if hasKey .Values.airflow.istio "hosts" }} {{- range .Values.airflow.istio.hosts }} - {{ . | quote }} {{- end }} + {{- end }} + {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - {{ .Values.airflow.istio.gateway }} + {{- end }} http: # Webserver routes - match: From 5363642bcb98b17c8c032f821edeafed26255eeb Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Thu, 4 Jun 2026 19:19:41 +0530 Subject: [PATCH 07/20] fix the tpl --- templates/webserver/webserver-virtualservice.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 9ce2f5bd..224688ca 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -64,6 +64,7 @@ spec: host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local port: number: {{ .Values.airflow.ports.airflowUI }} + {{- if hasKey .Values.airflow.istio "virtualService" }} {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} timeout: {{ .Values.airflow.istio.virtualService.timeout }} {{- end }} @@ -71,4 +72,5 @@ spec: retries: {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} {{- end }} + {{- end }} {{- end }} From c9717c8bb2536dc6148e2de677d9a4c91b745048 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Thu, 4 Jun 2026 19:29:37 +0530 Subject: [PATCH 08/20] fix the tpl --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index bed5f107..04b3da58 100644 --- a/values.yaml +++ b/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. airflow: - # istio config + # istio config section istio: enabled: false # group of airflow user From de38707c28bbaf007b97410473f30b259f341f36 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Thu, 4 Jun 2026 23:52:20 +0530 Subject: [PATCH 09/20] fix hosts --- templates/webserver/webserver-virtualservice.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 224688ca..072c607f 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -43,11 +43,7 @@ metadata: {{- end }} spec: hosts: - {{- if hasKey .Values.airflow.istio "hosts" }} - {{- range .Values.airflow.istio.hosts }} - - {{ . | quote }} - {{- end }} - {{- end }} + - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - {{ .Values.airflow.istio.gateway }} From fb26820c9f9dc17785323341472cc716aa231c33 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Fri, 5 Jun 2026 00:10:49 +0530 Subject: [PATCH 10/20] fix port mapping --- templates/webserver/webserver-virtualservice.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 072c607f..758fe516 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -53,13 +53,15 @@ spec: - match: - uri: prefix: "/{{ .Release.Name }}/airflow" - rewrite: - uri: "/airflow" route: - destination: host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} number: {{ .Values.airflow.ports.airflowUI }} + {{- end }} {{- if hasKey .Values.airflow.istio "virtualService" }} {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} timeout: {{ .Values.airflow.istio.virtualService.timeout }} From f7e978ef67812c9e67b8d71a0166de045b38eaa4 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Thu, 4 Jun 2026 17:23:48 -0500 Subject: [PATCH 11/20] add vs for flower --- templates/flower/flower-virtualservice.yaml | 74 +++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 templates/flower/flower-virtualservice.yaml diff --git a/templates/flower/flower-virtualservice.yaml b/templates/flower/flower-virtualservice.yaml new file mode 100644 index 00000000..43d1191a --- /dev/null +++ b/templates/flower/flower-virtualservice.yaml @@ -0,0 +1,74 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/}} + +################################ +## Airflow Flower VirtualService +################################# +{{- if and .Values.airflow.istio.enabled (eq .Values.airflow.executor "CeleryExecutor") }} +{{- $fullname := include "airflow.fullname" . }} +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: {{ $fullname }}-flower-virtualservice + labels: + tier: airflow + component: flower-virtualservice + release: {{ .Release.Name }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service }} + {{- with .Values.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.airflow.flower.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.airflow.flower.annotations }} + annotations: {{- toYaml .Values.airflow.flower.annotations | nindent 4 }} + {{- end }} +spec: + hosts: + - {{- include "deployments_subdomain" . | indent 1 }} + {{- if hasKey .Values.airflow.istio "gateway" }} + gateways: + - {{ .Values.airflow.istio.gateway }} + {{- end }} + http: + # Flower routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/flower" + route: + - destination: + host: {{ $fullname }}-flower.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.airflow.ports.flowerUI }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} + {{- end }} + {{- end }} +{{- end }} From c72eaabbe856b794aaf9e9ccab3a4383efb2a0f4 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Fri, 5 Jun 2026 14:32:26 -0500 Subject: [PATCH 12/20] add vs for flower for api-server --- .../api-server/api-server-virtualservice.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 templates/api-server/api-server-virtualservice.yaml diff --git a/templates/api-server/api-server-virtualservice.yaml b/templates/api-server/api-server-virtualservice.yaml new file mode 100644 index 00000000..eecec398 --- /dev/null +++ b/templates/api-server/api-server-virtualservice.yaml @@ -0,0 +1,74 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/}} + +################################ +## Airflow API Server VirtualService +################################# +{{- if and .Values.airflow.istio.enabled (semverCompare ">=3.0.0" .Values.airflow.airflowVersion) }} +{{- $fullname := include "airflow.fullname" . }} +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: {{ $fullname }}-api-server-virtualservice + labels: + tier: airflow + component: api-server-virtualservice + release: {{ .Release.Name }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service }} + {{- with .Values.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.airflow.apiServer.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.airflow.apiServer.annotations }} + annotations: {{- toYaml .Values.airflow.apiServer.annotations | nindent 4 }} + {{- end }} +spec: + hosts: + - {{- include "deployments_subdomain" . | indent 1 }} + {{- if hasKey .Values.airflow.istio "gateway" }} + gateways: + - {{ .Values.airflow.istio.gateway }} + {{- end }} + http: + # API Server routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/api" + route: + - destination: + host: {{ $fullname }}-api-server.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.airflow.ports.apiServer }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} + {{- end }} + {{- end }} +{{- end }} From 87d31025dfbfff7b1cd850ab6ff04959a354de3f Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Fri, 5 Jun 2026 14:49:50 -0500 Subject: [PATCH 13/20] vs for webserver was modified --- templates/webserver/webserver-virtualservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 758fe516..997c5c58 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -20,7 +20,7 @@ ################################ ## Airflow Webserver VirtualService ################################# -{{- if .Values.airflow.istio.enabled }} +{{- if and .Values.airflow.istio.enabled (semverCompare "<3.0.0" .Values.airflow.airflowVersion) }} {{- $fullname := include "airflow.fullname" . }} apiVersion: networking.istio.io/v1 kind: VirtualService From 22fcc9fb4ea656bedb455c7f10a0e79060e2e7af Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Fri, 5 Jun 2026 15:17:36 -0500 Subject: [PATCH 14/20] Update webserver-virtualservice.yaml --- templates/webserver/webserver-virtualservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 997c5c58..758fe516 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -20,7 +20,7 @@ ################################ ## Airflow Webserver VirtualService ################################# -{{- if and .Values.airflow.istio.enabled (semverCompare "<3.0.0" .Values.airflow.airflowVersion) }} +{{- if .Values.airflow.istio.enabled }} {{- $fullname := include "airflow.fullname" . }} apiVersion: networking.istio.io/v1 kind: VirtualService From 846679b6b93343e290d0c312985c2536d602a253 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Fri, 5 Jun 2026 15:38:15 -0500 Subject: [PATCH 15/20] Update webserver-virtualservice.yaml --- templates/webserver/webserver-virtualservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 758fe516..997c5c58 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -20,7 +20,7 @@ ################################ ## Airflow Webserver VirtualService ################################# -{{- if .Values.airflow.istio.enabled }} +{{- if and .Values.airflow.istio.enabled (semverCompare "<3.0.0" .Values.airflow.airflowVersion) }} {{- $fullname := include "airflow.fullname" . }} apiVersion: networking.istio.io/v1 kind: VirtualService From 2e12c91fbb54b0ab9c6d79b8d26dc6191ba663e9 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Fri, 5 Jun 2026 16:12:38 -0500 Subject: [PATCH 16/20] Update api-server-virtualservice.yaml --- templates/api-server/api-server-virtualservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/api-server/api-server-virtualservice.yaml b/templates/api-server/api-server-virtualservice.yaml index eecec398..7b31cd9f 100644 --- a/templates/api-server/api-server-virtualservice.yaml +++ b/templates/api-server/api-server-virtualservice.yaml @@ -52,7 +52,7 @@ spec: # API Server routes - match: - uri: - prefix: "/{{ .Release.Name }}/api" + prefix: "/{{ .Release.Name }}/airflow" route: - destination: host: {{ $fullname }}-api-server.{{ .Release.Namespace }}.svc.cluster.local From 29646cd04ce016f2df444f3767ca4793d5439fcc Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Mon, 8 Jun 2026 10:51:22 -0500 Subject: [PATCH 17/20] add vs for dag-server --- .../dag-deploy/dag-server-virtualservice.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 templates/dag-deploy/dag-server-virtualservice.yaml diff --git a/templates/dag-deploy/dag-server-virtualservice.yaml b/templates/dag-deploy/dag-server-virtualservice.yaml new file mode 100644 index 00000000..b1c3b399 --- /dev/null +++ b/templates/dag-deploy/dag-server-virtualservice.yaml @@ -0,0 +1,78 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/}} + +################################ +## DAG Server VirtualService +################################# +{{- if and .Values.airflow.istio.enabled .Values.dagDeploy.enabled }} +{{- $fullname := include "airflow.fullname" . }} +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: {{ $fullname }}-dag-server-virtualservice + labels: + tier: airflow + component: dag-server-virtualservice + release: {{ .Release.Name }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service }} + {{- with .Values.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.dagDeploy.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.dagDeploy.annotations }} + annotations: {{- toYaml .Values.dagDeploy.annotations | nindent 4 }} + {{- end }} +spec: + hosts: + - {{- include "deployments_subdomain" . | indent 1 }} + {{- if hasKey .Values.airflow.istio "gateway" }} + gateways: + - {{ .Values.airflow.istio.gateway }} + {{- end }} + http: + # DAG Server routes + - match: + - uri: + {{- if .Values.authSidecar.enabled }} + prefix: "/{{ .Release.Name }}/dags" + {{- else }} + regex: "/{{ .Release.Name }}/dags/(upload|downloads|healthz)(/.*)?" + {{- end }} + route: + - destination: + host: {{ $fullname }}-dag-server.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.dagDeploy.ports.dagServerHttp }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} + {{- end }} + {{- end }} +{{- end }} From c4e55ecb32f9b00c5b75549ad56ef3c08d4434c5 Mon Sep 17 00:00:00 2001 From: Oleksandr Liemieshko Date: Mon, 8 Jun 2026 11:14:46 -0500 Subject: [PATCH 18/20] Update ingress.yaml and add condition for dag-server --- templates/ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 067e383d..00879868 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -162,7 +162,7 @@ spec: name: flower-ui {{- end }} {{- end }} -{{- if and .Values.dagDeploy.enabled }} +{{- if and .Values.dagDeploy.enabled (not .Values.airflow.istio.enabled) }} --- kind: Ingress apiVersion: networking.k8s.io/v1 From 3dd9147df107a4d6b58eb16829951d6bc6db27cc Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Fri, 26 Jun 2026 10:54:46 +0530 Subject: [PATCH 19/20] add gsr support --- .../git-sync-relay-ingress.yaml | 1 + .../git-sync-relay-virtualservice.yaml | 78 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 templates/git-sync-relay/git-sync-relay-virtualservice.yaml diff --git a/templates/git-sync-relay/git-sync-relay-ingress.yaml b/templates/git-sync-relay/git-sync-relay-ingress.yaml index da254efe..93894c64 100644 --- a/templates/git-sync-relay/git-sync-relay-ingress.yaml +++ b/templates/git-sync-relay/git-sync-relay-ingress.yaml @@ -4,6 +4,7 @@ {{- if and .Values.gitSyncRelay.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook") + (not .Values.airflow.istio.enabled) }} kind: Ingress apiVersion: "networking.k8s.io/v1" diff --git a/templates/git-sync-relay/git-sync-relay-virtualservice.yaml b/templates/git-sync-relay/git-sync-relay-virtualservice.yaml new file mode 100644 index 00000000..3caba6be --- /dev/null +++ b/templates/git-sync-relay/git-sync-relay-virtualservice.yaml @@ -0,0 +1,78 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/}} + +############################################ +## Git Sync Relay webhook VirtualService. ## +############################################ +{{- if and + .Values.gitSyncRelay.enabled .Values.airflow.istio.enabled + (eq .Values.gitSyncRelay.repoFetchMode "webhook") +}} +{{- $fullname := include "airflow.fullname" . }} +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: {{ $fullname }}-git-sync-relay-virtualservice + labels: + tier: airflow + component: git-sync-relay-virtualservice + release: {{ .Release.Name }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service }} + {{- with .Values.airflow.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.gitSyncRelay.annotations }} + annotations: {{- toYaml .Values.gitSyncRelay.annotations | nindent 4 }} + {{- end }} +spec: + hosts: + - {{- include "deployments_subdomain" . | indent 1 }} + {{- if hasKey .Values.airflow.istio "gateway" }} + gateways: + - {{ .Values.airflow.istio.gateway }} + {{- end }} + http: + # git sync relay webhook Server routes + - match: + - uri: + {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} + - path: /{{ .Release.Name }}/git_sync + {{- else }} + - path: /{{ .Release.Name }}/git_sync(/|$)(.*) + {{- end }} + route: + - destination: + host: {{ $fullname }}-git-sync-relay.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.gitSyncRelay.gitSync.webhookPort }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} + {{- end }} + {{- end }} +{{- end }} From e8aa2cc62d75b5a601495122461a111ff25c971e Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Wed, 8 Jul 2026 20:24:53 +0530 Subject: [PATCH 20/20] fix regex and tpl errors --- .../api-server/api-server-virtualservice.yaml | 46 ++++++++-------- .../dag-deploy/dag-server-virtualservice.yaml | 54 +++++++++---------- templates/flower/flower-virtualservice.yaml | 46 ++++++++-------- .../git-sync-relay-virtualservice.yaml | 54 +++++++++---------- .../webserver/webserver-virtualservice.yaml | 46 ++++++++-------- 5 files changed, 123 insertions(+), 123 deletions(-) diff --git a/templates/api-server/api-server-virtualservice.yaml b/templates/api-server/api-server-virtualservice.yaml index 7b31cd9f..33e479c1 100644 --- a/templates/api-server/api-server-virtualservice.yaml +++ b/templates/api-server/api-server-virtualservice.yaml @@ -46,29 +46,29 @@ spec: - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - - {{ .Values.airflow.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} {{- end }} http: - # API Server routes - - match: - - uri: - prefix: "/{{ .Release.Name }}/airflow" - route: - - destination: - host: {{ $fullname }}-api-server.{{ .Release.Namespace }}.svc.cluster.local - port: - {{- if .Values.authSidecar.enabled }} - number: {{ .Values.authSidecar.port }} - {{- else }} - number: {{ .Values.airflow.ports.apiServer }} - {{- end }} - {{- if hasKey .Values.airflow.istio "virtualService" }} - {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} - timeout: {{ .Values.airflow.istio.virtualService.timeout }} - {{- end }} - {{- if hasKey .Values.airflow.istio.virtualService "retries" }} - retries: - {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} - {{- end }} - {{- end }} + # API Server routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/airflow" + route: + - destination: + host: {{ $fullname }}-api-server.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.airflow.ports.apiServer }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 8 }} + {{- end }} + {{- end }} {{- end }} diff --git a/templates/dag-deploy/dag-server-virtualservice.yaml b/templates/dag-deploy/dag-server-virtualservice.yaml index b1c3b399..6089aab9 100644 --- a/templates/dag-deploy/dag-server-virtualservice.yaml +++ b/templates/dag-deploy/dag-server-virtualservice.yaml @@ -46,33 +46,33 @@ spec: - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - - {{ .Values.airflow.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} {{- end }} http: - # DAG Server routes - - match: - - uri: - {{- if .Values.authSidecar.enabled }} - prefix: "/{{ .Release.Name }}/dags" - {{- else }} - regex: "/{{ .Release.Name }}/dags/(upload|downloads|healthz)(/.*)?" - {{- end }} - route: - - destination: - host: {{ $fullname }}-dag-server.{{ .Release.Namespace }}.svc.cluster.local - port: - {{- if .Values.authSidecar.enabled }} - number: {{ .Values.authSidecar.port }} - {{- else }} - number: {{ .Values.dagDeploy.ports.dagServerHttp }} - {{- end }} - {{- if hasKey .Values.airflow.istio "virtualService" }} - {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} - timeout: {{ .Values.airflow.istio.virtualService.timeout }} - {{- end }} - {{- if hasKey .Values.airflow.istio.virtualService "retries" }} - retries: - {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} - {{- end }} - {{- end }} + # DAG Server routes + - match: + - uri: + {{- if .Values.authSidecar.enabled }} + prefix: "/{{ .Release.Name }}/dags" + {{- else }} + regex: "/{{ .Release.Name }}/dags/(upload|downloads|healthz)(/.*)?" + {{- end }} + route: + - destination: + host: {{ $fullname }}-dag-server.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.dagDeploy.ports.dagServerHttp }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 8 }} + {{- end }} + {{- end }} {{- end }} diff --git a/templates/flower/flower-virtualservice.yaml b/templates/flower/flower-virtualservice.yaml index 43d1191a..2075b620 100644 --- a/templates/flower/flower-virtualservice.yaml +++ b/templates/flower/flower-virtualservice.yaml @@ -46,29 +46,29 @@ spec: - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - - {{ .Values.airflow.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} {{- end }} http: - # Flower routes - - match: - - uri: - prefix: "/{{ .Release.Name }}/flower" - route: - - destination: - host: {{ $fullname }}-flower.{{ .Release.Namespace }}.svc.cluster.local - port: - {{- if .Values.authSidecar.enabled }} - number: {{ .Values.authSidecar.port }} - {{- else }} - number: {{ .Values.airflow.ports.flowerUI }} - {{- end }} - {{- if hasKey .Values.airflow.istio "virtualService" }} - {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} - timeout: {{ .Values.airflow.istio.virtualService.timeout }} - {{- end }} - {{- if hasKey .Values.airflow.istio.virtualService "retries" }} - retries: - {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} - {{- end }} - {{- end }} + # Flower routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/flower" + route: + - destination: + host: {{ $fullname }}-flower.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.airflow.ports.flowerUI }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 8 }} + {{- end }} + {{- end }} {{- end }} diff --git a/templates/git-sync-relay/git-sync-relay-virtualservice.yaml b/templates/git-sync-relay/git-sync-relay-virtualservice.yaml index 3caba6be..6676cfaa 100644 --- a/templates/git-sync-relay/git-sync-relay-virtualservice.yaml +++ b/templates/git-sync-relay/git-sync-relay-virtualservice.yaml @@ -46,33 +46,33 @@ spec: - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - - {{ .Values.airflow.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} {{- end }} http: - # git sync relay webhook Server routes - - match: - - uri: - {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} - - path: /{{ .Release.Name }}/git_sync - {{- else }} - - path: /{{ .Release.Name }}/git_sync(/|$)(.*) - {{- end }} - route: - - destination: - host: {{ $fullname }}-git-sync-relay.{{ .Release.Namespace }}.svc.cluster.local - port: - {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} - number: {{ .Values.authSidecar.port }} - {{- else }} - number: {{ .Values.gitSyncRelay.gitSync.webhookPort }} - {{- end }} - {{- if hasKey .Values.airflow.istio "virtualService" }} - {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} - timeout: {{ .Values.airflow.istio.virtualService.timeout }} - {{- end }} - {{- if hasKey .Values.airflow.istio.virtualService "retries" }} - retries: - {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} - {{- end }} - {{- end }} + # git sync relay webhook Server routes + - match: + - uri: + {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} + exact: "/{{ .Release.Name }}/git_sync" + {{- else }} + regex: "/{{ .Release.Name }}/git_sync(/|$)(.*)" + {{- end }} + route: + - destination: + host: {{ $fullname }}-git-sync-relay.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook")}} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.gitSyncRelay.gitSync.webhookPort }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 8 }} + {{- end }} + {{- end }} {{- end }} diff --git a/templates/webserver/webserver-virtualservice.yaml b/templates/webserver/webserver-virtualservice.yaml index 997c5c58..648e32e8 100644 --- a/templates/webserver/webserver-virtualservice.yaml +++ b/templates/webserver/webserver-virtualservice.yaml @@ -46,29 +46,29 @@ spec: - {{- include "deployments_subdomain" . | indent 1 }} {{- if hasKey .Values.airflow.istio "gateway" }} gateways: - - {{ .Values.airflow.istio.gateway }} + - {{ .Values.airflow.istio.gateway }} {{- end }} http: - # Webserver routes - - match: - - uri: - prefix: "/{{ .Release.Name }}/airflow" - route: - - destination: - host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local - port: - {{- if .Values.authSidecar.enabled }} - number: {{ .Values.authSidecar.port }} - {{- else }} - number: {{ .Values.airflow.ports.airflowUI }} - {{- end }} - {{- if hasKey .Values.airflow.istio "virtualService" }} - {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} - timeout: {{ .Values.airflow.istio.virtualService.timeout }} - {{- end }} - {{- if hasKey .Values.airflow.istio.virtualService "retries" }} - retries: - {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 6 }} - {{- end }} - {{- end }} + # Webserver routes + - match: + - uri: + prefix: "/{{ .Release.Name }}/airflow" + route: + - destination: + host: {{ $fullname }}-webserver.{{ .Release.Namespace }}.svc.cluster.local + port: + {{- if .Values.authSidecar.enabled }} + number: {{ .Values.authSidecar.port }} + {{- else }} + number: {{ .Values.airflow.ports.airflowUI }} + {{- end }} + {{- if hasKey .Values.airflow.istio "virtualService" }} + {{- if hasKey .Values.airflow.istio.virtualService "timeout" }} + timeout: {{ .Values.airflow.istio.virtualService.timeout }} + {{- end }} + {{- if hasKey .Values.airflow.istio.virtualService "retries" }} + retries: + {{- toYaml .Values.airflow.istio.virtualService.retries | nindent 8 }} + {{- end }} + {{- end }} {{- end }}