paulkagiri opened a new pull request, #66598: URL: https://github.com/apache/airflow/pull/66598
Fixes #66579. When `workers.kubernetes.serviceAccount.create` is explicitly set to `false`, the pod template should still use the Kubernetes worker service account name from `workers.kubernetes.serviceAccount.name` instead of falling back to the deprecated `workers.serviceAccount` values. For a pure `KubernetesExecutor` deployment, the legacy worker ServiceAccount should also not be rendered in that explicit Kubernetes service account path. This keeps the existing default fallback when the Kubernetes worker service account section is not explicitly configured. Tests: - `PYTHONPATH=chart/tests python -m pytest chart/tests/helm_tests/airflow_aux/test_pod_template_file.py::TestPodTemplateFile::test_dedicated_service_account_name_when_creation_disabled chart/tests/helm_tests/airflow_core/test_worker.py::TestWorkerKubernetesServiceAccount::test_should_not_create_legacy_service_account_when_k8s_service_account_disabled -q` - `PYTHONPATH=chart/tests python -m pytest chart/tests/helm_tests/airflow_aux/test_pod_template_file.py::TestPodTemplateFile::test_service_account_name_default chart/tests/helm_tests/airflow_aux/test_pod_template_file.py::TestPodTemplateFile::test_dedicated_service_account_name_default chart/tests/helm_tests/airflow_core/test_worker.py::TestWorkerKubernetesServiceAccount::test_should_create_service_account_when_enabled -q` - `python -m black --check --target-version py312 chart/tests/helm_tests/airflow_aux/test_pod_template_file.py chart/tests/helm_tests/airflow_core/test_worker.py` - `python -m ruff check chart/tests/helm_tests/airflow_aux/test_pod_template_file.py chart/tests/helm_tests/airflow_core/test_worker.py` - `git diff --check` -- 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]
