@@ -1205,9 +1205,13 @@ def _gather_app_settings(self, release, app_settings, ptype, replicas, volumes=N
12051205 settings .KUBERNETES_DEPLOYMENTS_REVISION_HISTORY_LIMIT )
12061206
12071207 # get application level pod termination grace period
1208- pod_termination_grace_period_seconds = int (envs .get (
1209- 'KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS' ,
1210- settings .KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS ))
1208+ termination_grace_period_seconds = int (config .termination_grace_period .get (
1209+ ptype ,
1210+ envs .get (
1211+ 'KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS' ,
1212+ settings .KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS
1213+ )
1214+ ))
12111215
12121216 # set the image pull policy that is associated with the application container
12131217 image_pull_policy = envs .get ('IMAGE_PULL_POLICY' , settings .IMAGE_PULL_POLICY )
@@ -1240,16 +1244,15 @@ def _gather_app_settings(self, release, app_settings, ptype, replicas, volumes=N
12401244 'healthcheck' : healthcheck ,
12411245 'runtime_class_name' : limit_plan .runtime_class_name ,
12421246 'dns_policy' : settings .DRYCC_APP_DNS_POLICY ,
1243- 'lifecycle_post_start' : config .lifecycle_post_start ,
1244- 'lifecycle_pre_stop' : config .lifecycle_pre_stop ,
1247+ 'lifecycle_post_start' : config .lifecycle_post_start . get ( ptype , {}) ,
1248+ 'lifecycle_pre_stop' : config .lifecycle_pre_stop . get ( ptype , {}) ,
12451249 'routable' : routable ,
12461250 'deploy_batches' : batches ,
12471251 'restart_policy' : "Always" ,
12481252 'deploy_timeout' : deploy_timeout ,
12491253 'deployment_revision_history_limit' : deployment_history ,
12501254 'release_summary' : release .summary ,
1251- 'pod_termination_grace_period_seconds' : pod_termination_grace_period_seconds ,
1252- 'pod_termination_grace_period_each' : config .termination_grace_period ,
1255+ 'termination_grace_period_seconds' : termination_grace_period_seconds ,
12531256 'image_pull_secret_name' : image_pull_secret_name ,
12541257 'image_pull_policy' : image_pull_policy ,
12551258 'volumes' : volumes ,
0 commit comments