From 5035b9f36e77cc30cb28098bcc9ee8bbd34e3589 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Fri, 10 Dec 2021 20:01:08 +0530 Subject: [PATCH 01/10] fix network policy issue for webserver and flowerui --- chart/tests/test_flower.py | 3 ++- chart/tests/test_webserver.py | 2 +- chart/values.schema.json | 8 ++++---- chart/values.yaml | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/chart/tests/test_flower.py b/chart/tests/test_flower.py index e9181df9332f4..9ddf92417a0b6 100644 --- a/chart/tests/test_flower.py +++ b/chart/tests/test_flower.py @@ -352,7 +352,8 @@ def test_defaults(self): assert [{"namespaceSelector": {"matchLabels": {"release": "myrelease"}}}] == jmespath.search( "spec.ingress[0].from", docs[0] ) - assert [{"port": "flower-ui"}] == jmespath.search("spec.ingress[0].ports", docs[0]) + print(docs[0]) + assert [{"port": 5555}] == jmespath.search("spec.ingress[0].ports", docs[0]) @pytest.mark.parametrize( "ports, expected_ports", diff --git a/chart/tests/test_webserver.py b/chart/tests/test_webserver.py index 9f3b33ece9a11..59e17f27c87a2 100644 --- a/chart/tests/test_webserver.py +++ b/chart/tests/test_webserver.py @@ -595,7 +595,7 @@ def test_defaults(self): assert [{"namespaceSelector": {"matchLabels": {"release": "myrelease"}}}] == jmespath.search( "spec.ingress[0].from", docs[0] ) - assert [{"port": "airflow-ui"}] == jmespath.search("spec.ingress[0].ports", docs[0]) + assert [{"port": 8080}] == jmespath.search("spec.ingress[0].ports", docs[0]) @parameterized.expand( [ diff --git a/chart/values.schema.json b/chart/values.schema.json index ddb96d4bafbe8..0f4b53b7a0e9b 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -2158,12 +2158,12 @@ }, "default": [ { - "port": "airflow-ui" + "port": "{{ .Values.ports.airflowUI }}" } ], "examples": [ { - "port": "sidecar" + "port": "8080" } ] } @@ -2463,12 +2463,12 @@ "type": "array", "default": [ { - "port": "flower-ui" + "port": "{{ .Values.ports.flowerUI }}" } ], "examples": [ { - "port": "sidecar" + "port": "5555" } ] } diff --git a/chart/values.yaml b/chart/values.yaml index 2828707b9bdc0..5ba5188c496bb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -721,7 +721,7 @@ webserver: from: [] # Ports for webserver NetworkPolicy ingress (if `from` is set) ports: - - port: airflow-ui + - port: "{{ .Values.ports.airflowUI }}" resources: {} # limits: @@ -900,7 +900,7 @@ flower: from: [] # Ports for flower NetworkPolicy ingress (if ingressPeers is set) ports: - - port: flower-ui + - port: "{{ .Values.ports.flowerUI }}" resources: {} # limits: From 4c62587e6f0e0282defdc8ddda8a14c4ebecde2a Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Fri, 10 Dec 2021 20:48:54 +0530 Subject: [PATCH 02/10] Update chart/tests/test_flower.py Co-authored-by: Kaxil Naik --- chart/tests/test_flower.py | 1 - 1 file changed, 1 deletion(-) diff --git a/chart/tests/test_flower.py b/chart/tests/test_flower.py index 9ddf92417a0b6..7b44d2a0b6a25 100644 --- a/chart/tests/test_flower.py +++ b/chart/tests/test_flower.py @@ -352,7 +352,6 @@ def test_defaults(self): assert [{"namespaceSelector": {"matchLabels": {"release": "myrelease"}}}] == jmespath.search( "spec.ingress[0].from", docs[0] ) - print(docs[0]) assert [{"port": 5555}] == jmespath.search("spec.ingress[0].ports", docs[0]) @pytest.mark.parametrize( From ae9d01b387c48d4eb9c871392d04b06a5ef47b59 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Tue, 14 Dec 2021 23:50:32 +0530 Subject: [PATCH 03/10] updated values schema and UPDATING.rst file --- chart/UPDATING.rst | 5 +++++ chart/values.schema.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index 766c40780326e..a16394cffd260 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -43,6 +43,11 @@ Default Airflow image is updated to ``2.2.2`` The default Airflow image that is used with the Chart is now ``2.2.2``, previously it was ``2.2.1``. +Changes in webserver and flower networkPolicy +"""""""""""""""""""""""""""""""""""""""""""""" + +``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with openshift + Airflow Helm Chart 1.3.0 ------------------------ diff --git a/chart/values.schema.json b/chart/values.schema.json index 0f4b53b7a0e9b..d4352c0f7476f 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -2163,7 +2163,7 @@ ], "examples": [ { - "port": "8080" + "port": "8070" } ] } @@ -2468,7 +2468,7 @@ ], "examples": [ { - "port": "5555" + "port": "5565" } ] } From 7da390c7bc94cf9af22d54d41d8e87bb0c8593c6 Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Wed, 15 Dec 2021 00:01:06 +0530 Subject: [PATCH 04/10] Update chart/UPDATING.rst Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --- chart/UPDATING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index a16394cffd260..d9b5c6cee73e8 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -46,7 +46,7 @@ The default Airflow image that is used with the Chart is now ``2.2.2``, previous Changes in webserver and flower networkPolicy """""""""""""""""""""""""""""""""""""""""""""" -``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with openshift +``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift. Airflow Helm Chart 1.3.0 ------------------------ From 094cb725531b07a69cd437c389eabe67150a8b5c Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Wed, 15 Dec 2021 00:01:12 +0530 Subject: [PATCH 05/10] Update chart/UPDATING.rst Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --- chart/UPDATING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index d9b5c6cee73e8..c82a47c061def 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -43,7 +43,7 @@ Default Airflow image is updated to ``2.2.2`` The default Airflow image that is used with the Chart is now ``2.2.2``, previously it was ``2.2.1``. -Changes in webserver and flower networkPolicy +Changes in webserver and flower ``NetworkPolicy`` """""""""""""""""""""""""""""""""""""""""""""" ``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift. From 1c055a8385b0d6cb2552ac822e8616544061284a Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Wed, 15 Dec 2021 00:04:21 +0530 Subject: [PATCH 06/10] minor update to UPDATING.rst file --- chart/UPDATING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index c82a47c061def..26d44774ab3c0 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -44,7 +44,7 @@ Default Airflow image is updated to ``2.2.2`` The default Airflow image that is used with the Chart is now ``2.2.2``, previously it was ``2.2.1``. Changes in webserver and flower ``NetworkPolicy`` -"""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""" ``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift. From c5ec845c577aa899066e71b0bcd3f656cfe333b0 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Wed, 15 Dec 2021 00:20:38 +0530 Subject: [PATCH 07/10] setting portnumbers as int in schema for webserver and flower network policies --- chart/values.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/values.schema.json b/chart/values.schema.json index d4352c0f7476f..b26802748bd62 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -2163,7 +2163,7 @@ ], "examples": [ { - "port": "8070" + "port": 8070 } ] } @@ -2468,7 +2468,7 @@ ], "examples": [ { - "port": "5565" + "port": 5565 } ] } From 71cb55cf3df695900c51a4ed3edd147e02099db7 Mon Sep 17 00:00:00 2001 From: pgvishnuram Date: Wed, 15 Dec 2021 01:17:13 +0530 Subject: [PATCH 08/10] updates to webserver and flower network policy test case funtions --- chart/tests/test_flower.py | 4 ---- chart/tests/test_webserver.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/chart/tests/test_flower.py b/chart/tests/test_flower.py index 7b44d2a0b6a25..917aa4ff9239b 100644 --- a/chart/tests/test_flower.py +++ b/chart/tests/test_flower.py @@ -357,10 +357,6 @@ def test_defaults(self): @pytest.mark.parametrize( "ports, expected_ports", [ - ( - [{"protocol": "UDP", "port": "{{ .Values.ports.flowerUI }}"}], - [{"protocol": "UDP", "port": 5555}], - ), ([{"port": "sidecar"}], [{"port": "sidecar"}]), ( [ diff --git a/chart/tests/test_webserver.py b/chart/tests/test_webserver.py index 59e17f27c87a2..66ef0ca4771a5 100644 --- a/chart/tests/test_webserver.py +++ b/chart/tests/test_webserver.py @@ -599,10 +599,6 @@ def test_defaults(self): @parameterized.expand( [ - ( - [{"protocol": "UDP", "port": "{{ .Values.ports.airflowUI }}"}], - [{"protocol": "UDP", "port": 8080}], - ), ([{"port": "sidecar"}], [{"port": "sidecar"}]), ( [ From 273e53be4ef712def70d560eccbffbe03f1a9648 Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Thu, 16 Dec 2021 00:11:42 +0530 Subject: [PATCH 09/10] Update chart/UPDATING.rst Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --- chart/UPDATING.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index 26d44774ab3c0..2a6c93e90c51a 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -43,8 +43,8 @@ Default Airflow image is updated to ``2.2.2`` The default Airflow image that is used with the Chart is now ``2.2.2``, previously it was ``2.2.1``. -Changes in webserver and flower ``NetworkPolicy`` -""""""""""""""""""""""""""""""""""""""""""""""""" +Changes in webserver and flower ``NetworkPolicy`` default ports +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" ``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift. From 2db2ee141484fa8de5ab2a7e813818ec330fd9e1 Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Thu, 16 Dec 2021 00:11:48 +0530 Subject: [PATCH 10/10] Update chart/UPDATING.rst Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --- chart/UPDATING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index 2a6c93e90c51a..413c312b1501b 100644 --- a/chart/UPDATING.rst +++ b/chart/UPDATING.rst @@ -46,7 +46,7 @@ The default Airflow image that is used with the Chart is now ``2.2.2``, previous Changes in webserver and flower ``NetworkPolicy`` default ports """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift. +The defaults for ``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from using named ports to numerical ports to avoid issues with OpenShift. Airflow Helm Chart 1.3.0 ------------------------