Miretpl commented on code in PR #72555:
URL: https://github.com/apache/airflow/pull/72555#discussion_r4098779070
##########
chart/tests/helm_tests/security/test_kerberos.py:
##########
@@ -36,6 +36,19 @@ def test_kerberos_not_mentioned_in_render_if_disabled(self):
k8s_objects_to_consider_str = json.dumps(k8s_objects_to_consider)
assert k8s_objects_to_consider_str.count("kerberos") == 1
+ @pytest.mark.parametrize("init_values", [{"enabled": True}, {"enabled":
False}, {}])
+ @pytest.mark.parametrize(
+ ("worker_type", "worker_set"),
+ [("celery", False), ("kubernetes", False), ("celery", True)],
+ )
+ def test_removed_kerberos_init_container_settings(self, init_values,
worker_type, worker_set):
+ worker_values = {"kerberosInitContainer": init_values}
+ if worker_set:
+ worker_values = {"enableDefault": False, "sets": [{"name": "test",
**worker_values}]}
+
+ with pytest.raises(HelmFailedError, match=r"kerberosInitContainer':
'not' failed"):
+ render_chart(values={"workers": {worker_type: worker_values}})
Review Comment:
I would separate it a bit for default behaviour and by the worker-set value.
It should simplify the test cases itself a bit.
##########
chart/values.schema.json:
##########
@@ -2112,6 +2118,10 @@
}
}
},
+ "kerberosInitContainer": {
Review Comment:
Is removing the existing one not enough? 🤔
##########
chart/values.schema.json:
##########
@@ -1793,7 +1793,13 @@
"default": [],
"items": {
"type": "object",
- "additionalProperties": {}
+ "additionalProperties": {},
+ "properties": {
+ "kerberosInitContainer": {
+ "description": "Removed in chart
2.0.0. Configure `kerberosSidecar` instead and enable its `startupProbe` to
wait for the initial Kerberos ticket.",
+ "not": {}
+ }
+ }
Review Comment:
I would remove that from the worker set. There is a missing validation part
for the whole worker set configuration at the schema level, but this is
something which I need to figure out how I would like to have it done, and
before that, I would prefare to maintain the status quo for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]