Skip to content

Commit

Permalink
feat(provider/kubernetes): Specify termination grace period seconds (#…
Browse files Browse the repository at this point in the history
…1572)

Adds clouddriver support for spinnaker/spinnaker#1107
  • Loading branch information
parajanoff authored and danielpeach committed Apr 17, 2017
1 parent c611b6e commit 56d47c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Expand Up @@ -617,6 +617,8 @@ class KubernetesApiConverter {
fromContainer(it)
} ?: []

deployDescription.terminationGracePeriodSeconds = replicaSet?.spec?.template?.spec?.terminationGracePeriodSeconds

return deployDescription
}

Expand Down Expand Up @@ -669,6 +671,8 @@ class KubernetesApiConverter {
fromContainer(it)
} ?: []

deployDescription.terminationGracePeriodSeconds = replicationController?.spec?.template?.spec?.terminationGracePeriodSeconds

return deployDescription
}

Expand Down Expand Up @@ -885,6 +889,10 @@ class KubernetesApiConverter {
podTemplateSpecBuilder.withRestartPolicy(description.restartPolicy)
}

if (description.terminationGracePeriodSeconds) {
podTemplateSpecBuilder.withTerminationGracePeriodSeconds(description.terminationGracePeriodSeconds)
}

podTemplateSpecBuilder = podTemplateSpecBuilder.withImagePullSecrets()

for (def imagePullSecret : description.imagePullSecrets) {
Expand Down
Expand Up @@ -44,6 +44,7 @@ class DeployKubernetesAtomicOperationDescription extends KubernetesAtomicOperati
Map<String, String> nodeSelector
KubernetesSecurityContext securityContext
KubernetesDeployment deployment
Long terminationGracePeriodSeconds

@JsonIgnore
Set<String> imagePullSecrets
Expand Down

0 comments on commit 56d47c2

Please sign in to comment.