Skip to content

Commit

Permalink
refactor(k8s): minor change to speed up container deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and drubin committed Dec 11, 2018
1 parent 89d2166 commit 91da102
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions garden-service/src/plugins/kubernetes/deployment.ts
Expand Up @@ -232,8 +232,9 @@ export async function createDeployment(
deployment.spec.strategy = {
type: "RollingUpdate",
rollingUpdate: {
maxUnavailable: "34%",
maxSurge: "34%",
// This is optimized for fast re-deployment.
maxUnavailable: 1,
maxSurge: 1,
},
}
deployment.spec.revisionHistoryLimit = 3
Expand Down Expand Up @@ -297,7 +298,7 @@ function deploymentConfig(
containers: [],
// TODO: make restartPolicy configurable
restartPolicy: "Always",
terminationGracePeriodSeconds: 10,
terminationGracePeriodSeconds: 5,
dnsPolicy: "ClusterFirst",
// TODO: support private registries
// imagePullSecrets: [
Expand Down

0 comments on commit 91da102

Please sign in to comment.