Add update strategy config

This commit is contained in:
Dmytro Bondar 2024-04-22 21:42:31 +02:00
parent ffcc33798d
commit e8a472b69a
No known key found for this signature in database
GPG Key ID: C123CD37BBED8BB7
4 changed files with 14 additions and 0 deletions

View File

@ -52,6 +52,7 @@ The [Values](#values) section lists the parameters that can be configured during
| revisionHistoryLimit | string | `10` | The number of old ReplicaSets to retain to allow rollback. |
| securityContext.capabilities.add | list | `["NET_ADMIN"]` | Add capabilities to the container |
| sidecarContainers | list | `[]` | Pod sidecar containers. Evaluated as a template |
| strategy | object | `{"type":"RollingUpdate"}` | Update strategy for the workload Valid values are: `RollingUpdate` or `Recreate` for Deployment, `RollingUpdate` or `OnDelete` for StatefulSet |
| tolerations | list | `[]` | Tolerations configuration |
| volumeMounts | list | `[]` | Additional volumeMounts |
| volumes | list | `[]` | Additional volumes |

View File

@ -8,6 +8,9 @@ spec:
{{- with .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ . }}
{{- end }}
{{- with .Values.strategy }}
strategy: {{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "wg-portal.selectorLabels" . | nindent 6 }}
template: {{- include "wg-portal.podTemplate" . | nindent 4 }}

View File

@ -8,6 +8,9 @@ spec:
{{- with .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ . }}
{{- end }}
{{- with .Values.strategy }}
updateStrategy: {{- toYaml . | nindent 4 }}
{{- end }}
serviceName: {{ template "wg-portal.fullname" . }}-web
selector:
matchLabels: {{- include "wg-portal.selectorLabels" . | nindent 6 }}

View File

@ -48,6 +48,13 @@ revisionHistoryLimit: ''
# -- Workload type - `Deployment` or `StatefulSet`
# @section -- Parameters
workloadType: Deployment
# -- Update strategy for the workload
# Valid values are:
# `RollingUpdate` or `Recreate` for Deployment,
# `RollingUpdate` or `OnDelete` for StatefulSet
# @section -- Parameters
strategy:
type: RollingUpdate
image:
# -- Image repository