Drain API pods before Kubernetes shutdown
This commit is contained in:
@@ -460,6 +460,22 @@ class DeploymentInstallerTests(unittest.TestCase):
|
||||
"containers"
|
||||
][0]["readinessProbe"]["httpGet"]["httpHeaders"],
|
||||
)
|
||||
api_pod_spec = deployments["govoplan-cluster-api"]["spec"]["template"][
|
||||
"spec"
|
||||
]
|
||||
self.assertEqual(30, api_pod_spec["terminationGracePeriodSeconds"])
|
||||
self.assertEqual(
|
||||
["/bin/sh", "-c", "sleep 10"],
|
||||
api_pod_spec["containers"][0]["lifecycle"]["preStop"]["exec"][
|
||||
"command"
|
||||
],
|
||||
)
|
||||
self.assertNotIn(
|
||||
"lifecycle",
|
||||
deployments["govoplan-cluster-worker"]["spec"]["template"]["spec"][
|
||||
"containers"
|
||||
][0],
|
||||
)
|
||||
worker_command = deployments["govoplan-cluster-worker"]["spec"]["template"][
|
||||
"spec"
|
||||
]["containers"][0]["command"]
|
||||
|
||||
Reference in New Issue
Block a user