Skip to content

Commit

Permalink
feat(argo-rollout): Add configurable deployment strategy for Argo Rol…
Browse files Browse the repository at this point in the history
…louts controller

Signed-off-by: Nedal Eskaif <[email protected]>
  • Loading branch information
Nedal Eskaif authored and Nedal Eskaif committed Jan 5, 2024
1 parent 9b0c33f commit 02f5fc1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/argo-rollouts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v1.6.4
description: A Helm chart for Argo Rollouts
name: argo-rollouts
version: 2.34.0
version: 2.35.0
home: https://github.com/argoproj/argo-helm
icon: https://argoproj.github.io/argo-rollouts/assets/logo.png
keywords:
Expand All @@ -18,5 +18,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Allow setting log config for rollouts dashboard
- kind: added
description: Allow configuring deployment strategy for the Argo Rollouts controller
3 changes: 3 additions & 0 deletions charts/argo-rollouts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ For full list of changes please check ArtifactHub [changelog].
| controller.containerPorts.healthz | int | `8080` | Healthz container port |
| controller.containerPorts.metrics | int | `8090` | Metrics container port |
| controller.createClusterRole | bool | `true` | flag to enable creation of cluster controller role (requires cluster RBAC) |
| controller.deploymentStrategy.type | string | `""` | Deployment strategy type. Options: "Recreate" or "RollingUpdate". If not specified, defaults to "Recreate". |
| controller.deploymentStrategy.rollingUpdate.maxSurge | int or string | `0` | Maximum number or percentage of additional pods that can be created during an update. |
| controller.deploymentStrategy.rollingUpdate.maxUnavailable | int or string | `0` | Maximum number or percentage of pods that can be unavailable during an update. |
| controller.deploymentAnnotations | object | `{}` | Annotations to be added to the controller deployment |
| controller.extraArgs | list | `[]` | Additional command line arguments to pass to rollouts-controller. A list of flags. |
| controller.extraContainers | list | `[]` | Literal yaml for extra containers to be added to controller deployment. |
Expand Down
5 changes: 5 additions & 0 deletions charts/argo-rollouts/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ spec:
matchLabels:
app.kubernetes.io/component: {{ .Values.controller.component }}
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
{{- if eq .Values.controller.deploymentStrategy.type "RollingUpdate" }}
strategy:
{{- toYaml .Values.controller.deploymentStrategy | nindent 4 }}
{{- else }}
strategy:
type: Recreate
{{- end }}
replicas: {{ .Values.controller.replicas }}
template:
metadata:
Expand Down
7 changes: 7 additions & 0 deletions charts/argo-rollouts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ global:
controller:
# -- Value of label `app.kubernetes.io/component`
component: rollouts-controller
# Configuration for the deployment strategy defaults to Recreate
deploymentStrategy: {}
# type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# -- Annotations to be added to the controller deployment
deploymentAnnotations: {}
# -- Annotations to be added to application controller pods
Expand Down

0 comments on commit 02f5fc1

Please sign in to comment.