Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix network policy issue for webserver and flowerui #20199

Merged
5 changes: 5 additions & 0 deletions chart/UPDATING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
"""""""""""""""""""""""""""""""""""""""""""""""""
pgvishnuram marked this conversation as resolved.
Show resolved Hide resolved

``webserver.networkPolicy.ingress.ports`` and ``flower.networkPolicy.ingress.ports`` moved away from named port to port number to avoid issues with OpenShift.
pgvishnuram marked this conversation as resolved.
Show resolved Hide resolved

Airflow Helm Chart 1.3.0
------------------------

Expand Down
6 changes: 1 addition & 5 deletions chart/tests/test_flower.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
jedcunningham marked this conversation as resolved.
Show resolved Hide resolved

@pytest.mark.parametrize(
"ports, expected_ports",
[
(
[{"protocol": "UDP", "port": "{{ .Values.ports.flowerUI }}"}],
[{"protocol": "UDP", "port": 5555}],
),
([{"port": "sidecar"}], [{"port": "sidecar"}]),
(
[
Expand Down
6 changes: 1 addition & 5 deletions chart/tests/test_webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]),
(
[
Expand Down
8 changes: 4 additions & 4 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2158,12 +2158,12 @@
},
"default": [
{
"port": "airflow-ui"
"port": "{{ .Values.ports.airflowUI }}"
}
],
"examples": [
{
"port": "sidecar"
"port": 8070
}
]
}
Expand Down Expand Up @@ -2463,12 +2463,12 @@
"type": "array",
"default": [
{
"port": "flower-ui"
"port": "{{ .Values.ports.flowerUI }}"
}
],
"examples": [
{
"port": "sidecar"
"port": 5565
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ webserver:
from: []
# Ports for webserver NetworkPolicy ingress (if `from` is set)
ports:
- port: airflow-ui
- port: "{{ .Values.ports.airflowUI }}"
pgvishnuram marked this conversation as resolved.
Show resolved Hide resolved

resources: {}
# limits:
Expand Down Expand Up @@ -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:
Expand Down