aaron-y-chen commented on code in PR #72555:
URL: https://github.com/apache/airflow/pull/72555#discussion_r4054720074
##########
chart/tests/helm_tests/airflow_aux/test_pod_template_file.py:
##########
@@ -1293,6 +1296,80 @@ def
test_runtime_class_name_values_are_configurable(self):
assert jmespath.search("spec.runtimeClassName", docs[0]) == "nvidia"
+ def test_kerberos_sidecar_is_native_sidecar(self):
+ docs = render_chart(
+ values={"workers": {"kubernetes": {"kerberosSidecar": {"enabled":
True}}}},
+ show_only=["templates/pod-template-file.yaml"],
+ chart_dir=self.temp_chart_dir,
+ )
+ sidecar =
jmespath.search("spec.initContainers[?name=='worker-kerberos'] | [0]", docs[0])
+ assert sidecar is not None
+ assert sidecar["restartPolicy"] == "Always"
+ assert jmespath.search("spec.containers[?name=='worker-kerberos'] |
[0]", docs[0]) is None
+
+ @pytest.mark.parametrize(
+ ("sidecar_enabled", "probe_enabled", "expected_names"),
+ [
+ (False, True, []),
+ (True, True, ["worker-kerberos"]),
+ (True, False, ["worker-kerberos"]),
+ ],
+ )
+ def test_kerberos_initialization(self, sidecar_enabled, probe_enabled,
expected_names):
Review Comment:
Nice suggestion! I've already applied it.
--
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]