From 827ed23cf61eb4af73438036b41aea1dc552a942 Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Fri, 10 Dec 2021 01:44:13 +0000 Subject: [PATCH] chore: add update strategy configuration Add the default update strategy settings, as these are checked by the kube-linter linter. This is not a behavior change, and simply encodes the default settings into our Chart. --- kube-linter.yaml | 3 +-- templates/coderd.yaml | 1 + templates/timescale.yaml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kube-linter.yaml b/kube-linter.yaml index d32d1221..7ede8176 100644 --- a/kube-linter.yaml +++ b/kube-linter.yaml @@ -19,6 +19,7 @@ checks: - no-liveness-probe - no-read-only-root-fs - no-readiness-probe + - no-rolling-update-strategy - non-existent-service-account - privilege-escalation-container - privileged-container @@ -39,8 +40,6 @@ checks: - access-to-secrets # TODO: evaluate high availability by default - minimum-three-replicas - # TODO: add update strategy - - no-rolling-update-strategy # TODO: add network policy for coderd and timescale pods - non-isolated-pod - required-annotation-email diff --git a/templates/coderd.yaml b/templates/coderd.yaml index 242f90a8..79897736 100644 --- a/templates/coderd.yaml +++ b/templates/coderd.yaml @@ -16,6 +16,7 @@ metadata: spec: replicas: {{ include "movedValue" (dict "Values" .Values "Key" "coderd.replicas" 1) }} strategy: + type: RollingUpdate rollingUpdate: maxSurge: "25%" maxUnavailable: "25%" diff --git a/templates/timescale.yaml b/templates/timescale.yaml index 91353d32..0b47483f 100644 --- a/templates/timescale.yaml +++ b/templates/timescale.yaml @@ -30,6 +30,10 @@ metadata: spec: serviceName: timescale replicas: 1 + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 selector: matchLabels: app: timescale