diff --git a/chart/UPDATING.rst b/chart/UPDATING.rst index 766c40780326e..413c312b1501b 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`` default ports +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +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 ------------------------ diff --git a/chart/tests/test_flower.py b/chart/tests/test_flower.py index e9181df9332f4..917aa4ff9239b 100644 --- a/chart/tests/test_flower.py +++ b/chart/tests/test_flower.py @@ -352,15 +352,11 @@ 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]) + assert [{"port": 5555}] == jmespath.search("spec.ingress[0].ports", docs[0]) @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 9f3b33ece9a11..66ef0ca4771a5 100644 --- a/chart/tests/test_webserver.py +++ b/chart/tests/test_webserver.py @@ -595,14 +595,10 @@ 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( [ - ( - [{"protocol": "UDP", "port": "{{ .Values.ports.airflowUI }}"}], - [{"protocol": "UDP", "port": 8080}], - ), ([{"port": "sidecar"}], [{"port": "sidecar"}]), ( [ diff --git a/chart/values.schema.json b/chart/values.schema.json index ddb96d4bafbe8..b26802748bd62 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": 8070 } ] } @@ -2463,12 +2463,12 @@ "type": "array", "default": [ { - "port": "flower-ui" + "port": "{{ .Values.ports.flowerUI }}" } ], "examples": [ { - "port": "sidecar" + "port": 5565 } ] } 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: