diff --git a/chart/templates/autosync/deployment.yaml b/chart/templates/autosync/deployment.yaml index 1b05144f5..d2151e4ac 100644 --- a/chart/templates/autosync/deployment.yaml +++ b/chart/templates/autosync/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.autosync.name "name" .Values.autosync.name) | nindent 4 }} spec: replicas: {{ .Values.autosync.replicaCount }} + {{- with .Values.autosync.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.autosync.name) | nindent 6 }} diff --git a/chart/templates/back/deployment.yaml b/chart/templates/back/deployment.yaml index 60fead136..63db2ffd8 100644 --- a/chart/templates/back/deployment.yaml +++ b/chart/templates/back/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.back.name "name" .Values.back.name) | nindent 4 }} spec: replicas: {{ .Values.back.replicaCount }} + {{- with .Values.back.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.back.name) | nindent 6 }} diff --git a/chart/templates/front/deployment.yaml b/chart/templates/front/deployment.yaml index c39457368..fbbf597bc 100644 --- a/chart/templates/front/deployment.yaml +++ b/chart/templates/front/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.front.name "name" .Values.front.name) | nindent 4 }} spec: replicas: {{ .Values.front.replicaCount }} + {{- with .Values.front.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.front.name) | nindent 6 }} diff --git a/chart/templates/matcher/deployment.yaml b/chart/templates/matcher/deployment.yaml index 32d0906a3..bb569ed99 100644 --- a/chart/templates/matcher/deployment.yaml +++ b/chart/templates/matcher/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.matcher.name "name" .Values.matcher.name) | nindent 4 }} spec: replicas: {{ .Values.matcher.replicaCount }} + {{- with .Values.matcher.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.matcher.name) | nindent 6 }} diff --git a/chart/templates/scanner/deployment.yaml b/chart/templates/scanner/deployment.yaml index 893a69837..080845fa3 100644 --- a/chart/templates/scanner/deployment.yaml +++ b/chart/templates/scanner/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.scanner.name "name" .Values.scanner.name) | nindent 4 }} spec: replicas: {{ .Values.scanner.replicaCount }} + {{- with .Values.scanner.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.scanner.name) | nindent 6 }} diff --git a/chart/templates/transcoder/deployment.yaml b/chart/templates/transcoder/deployment.yaml index 8123a47aa..df68ce3e2 100644 --- a/chart/templates/transcoder/deployment.yaml +++ b/chart/templates/transcoder/deployment.yaml @@ -12,6 +12,10 @@ metadata: {{- include "kyoo.labels" (dict "context" . "component" .Values.transcoder.name "name" .Values.transcoder.name) | nindent 4 }} spec: replicas: {{ .Values.transcoder.replicaCount }} + {{- with .Values.transcoder.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.transcoder.name) | nindent 6 }} diff --git a/chart/values.yaml b/chart/values.yaml index 5b0144663..5cc3f8e1d 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -180,6 +180,7 @@ autosync: repository: ~ tag: ~ replicaCount: 1 + updateStrategy: ~ podLabels: {} deploymentAnnotations: {} podAnnotations: {} @@ -223,6 +224,9 @@ back: volumeMounts: [] volumes: [] replicaCount: 1 + # default to recreate for better user experience with ReadWriteOnce volumes + updateStrategy: + type: Recreate podLabels: {} deploymentAnnotations: {} podAnnotations: {} @@ -266,6 +270,7 @@ front: repository: ~ tag: ~ replicaCount: 1 + updateStrategy: ~ podLabels: {} deploymentAnnotations: {} podAnnotations: {} @@ -304,6 +309,7 @@ matcher: tag: ~ # matcher does not support multiple replicas replicaCount: 1 + updateStrategy: ~ podLabels: {} deploymentAnnotations: {} podAnnotations: {} @@ -334,6 +340,7 @@ scanner: tag: ~ # scanner does not support multiple replicas replicaCount: 1 + updateStrategy: ~ podLabels: {} deploymentAnnotations: {} podAnnotations: {} @@ -369,6 +376,9 @@ transcoder: - name: cache emptyDir: {} replicaCount: 1 + # default to recreate for better user experience with ReadWriteOnce volumes + updateStrategy: + type: Recreate podLabels: {} deploymentAnnotations: {} podAnnotations: {}