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

Chart: pass workers.terminationGracePeriodSeconds into KubeExecutor pod template #33514

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/files/pod-template-file.kubernetes-helm-yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ spec:
securityContext: {{ $securityContext | nindent 4 }}
nodeSelector: {{- toYaml $nodeSelector | nindent 4 }}
affinity: {{- toYaml $affinity | nindent 4 }}
terminationGracePeriodSeconds: {{ .Values.workers.terminationGracePeriodSeconds }}
tolerations: {{- toYaml $tolerations | nindent 4 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 4 }}
serviceAccountName: {{ include "worker.serviceAccountName" . }}
Expand Down
13 changes: 13 additions & 0 deletions helm_tests/airflow_aux/test_pod_template_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,3 +767,16 @@ def test_workers_container_lifecycle_webhooks_are_configurable(self, hook_type="
assert lifecycle_hook_params["lifecycle_parsed"] == jmespath.search(
f"spec.containers[0].lifecycle.{hook_type}", docs[0]
)

def test_termination_grace_period_seconds(self):
docs = render_chart(
values={
"workers": {
"terminationGracePeriodSeconds": 123,
},
},
show_only=["templates/pod-template-file.yaml"],
chart_dir=self.temp_chart_dir,
)

assert 123 == jmespath.search("spec.terminationGracePeriodSeconds", docs[0])