feat(argo-cd): Add support for custom Deployment strategy (#1918)
Signed-off-by: Laurent Lavaud <l.lavaud@gmail.com>
This commit is contained in:
parent
0697ab1e4b
commit
4ea0119321
9 changed files with 83 additions and 4 deletions
|
@ -3,7 +3,7 @@ appVersion: v2.6.7
|
|||
kubeVersion: ">=1.22.0-0"
|
||||
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
name: argo-cd
|
||||
version: 5.27.5
|
||||
version: 5.28.0
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||
sources:
|
||||
|
@ -23,5 +23,5 @@ dependencies:
|
|||
condition: redis-ha.enabled
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- kind: changed
|
||||
description: entrypoint usage can be configured
|
||||
- kind: added
|
||||
description: Add support for custom Deployment strategy
|
||||
|
|
|
@ -394,6 +394,7 @@ NAME: my-release
|
|||
| global.affinity.nodeAffinity.type | string | `"hard"` | Default node affinity rules. Either: `none`, `soft` or `hard` |
|
||||
| global.affinity.podAntiAffinity | string | `"soft"` | Default pod anti-affinity rules. Either: `none`, `soft` or `hard` |
|
||||
| global.deploymentAnnotations | object | `{}` | Annotations for the all deployed Deployments |
|
||||
| global.deploymentStrategy | object | `{}` | Deployment strategy for the all deployed Deployments |
|
||||
| global.entrypoint.entrypoint | string | `"entrypoint.sh"` | The entrypoint to use for the containers. |
|
||||
| global.entrypoint.useImplicit | bool | `false` | Implicitly use the docker image's entrypoint. This requires the image to have ENTRYPOINT set properly |
|
||||
| global.hostAliases | list | `[]` | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files |
|
||||
|
@ -573,6 +574,7 @@ NAME: my-release
|
|||
| repoServer.containerPorts.server | int | `8081` | Repo server container port |
|
||||
| repoServer.containerSecurityContext | object | See [values.yaml] | Repo server container-level security context |
|
||||
| repoServer.deploymentAnnotations | object | `{}` | Annotations to be added to repo server Deployment |
|
||||
| repoServer.deploymentStrategy | object | `{}` | Deployment strategy to be added to the repo server Deployment |
|
||||
| repoServer.dnsConfig | object | `{}` | [DNS configuration] |
|
||||
| repoServer.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for Repo server pods |
|
||||
| repoServer.env | list | `[]` | Environment variables to pass to repo server |
|
||||
|
@ -676,6 +678,7 @@ NAME: my-release
|
|||
| server.containerPorts.server | int | `8080` | Server container port |
|
||||
| server.containerSecurityContext | object | See [values.yaml] | Server container-level security context |
|
||||
| server.deploymentAnnotations | object | `{}` | Annotations to be added to server Deployment |
|
||||
| server.deploymentStrategy | object | `{}` | Deployment strategy to be added to the server Deployment |
|
||||
| server.dnsConfig | object | `{}` | [DNS configuration] |
|
||||
| server.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for Server pods |
|
||||
| server.env | list | `[]` | Environment variables to pass to Argo CD server |
|
||||
|
@ -822,6 +825,7 @@ server:
|
|||
| dex.containerPorts.metrics | int | `5558` | Metrics container port |
|
||||
| dex.containerSecurityContext | object | See [values.yaml] | Dex container-level security context |
|
||||
| dex.deploymentAnnotations | object | `{}` | Annotations to be added to the Dex server Deployment |
|
||||
| dex.deploymentStrategy | object | `{}` | Deployment strategy to be added to the Dex server Deployment |
|
||||
| dex.dnsConfig | object | `{}` | [DNS configuration] |
|
||||
| dex.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for Dex server pods |
|
||||
| dex.enabled | bool | `true` | Enable dex |
|
||||
|
@ -1012,6 +1016,7 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
|
|||
| applicationSet.containerPorts.webhook | int | `7000` | Webhook container port |
|
||||
| applicationSet.containerSecurityContext | object | See [values.yaml] | ApplicationSet controller container-level security context |
|
||||
| applicationSet.deploymentAnnotations | object | `{}` | Annotations to be added to ApplicationSet controller Deployment |
|
||||
| applicationSet.deploymentStrategy | object | `{}` | Deployment strategy to be added to the ApplicationSet controller Deployment |
|
||||
| applicationSet.dnsConfig | object | `{}` | [DNS configuration] |
|
||||
| applicationSet.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for ApplicationSet controller pods |
|
||||
| applicationSet.enabled | bool | `true` | Enable ApplicationSet controller |
|
||||
|
@ -1097,6 +1102,7 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
|
|||
| notifications.containerSecurityContext | object | See [values.yaml] | Notification controller container-level security Context |
|
||||
| notifications.context | object | `{}` | Define user-defined context |
|
||||
| notifications.deploymentAnnotations | object | `{}` | Annotations to be applied to the notifications controller Deployment |
|
||||
| notifications.deploymentStrategy | object | `{"type":"Recreate"}` | Deployment strategy to be added to the notifications controller Deployment |
|
||||
| notifications.dnsConfig | object | `{}` | [DNS configuration] |
|
||||
| notifications.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for notifications controller Pods |
|
||||
| notifications.enabled | bool | `true` | Enable notifications controller |
|
||||
|
|
|
@ -120,3 +120,20 @@ nodeAffinity:
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common deployment strategy definition
|
||||
- Recreate don't have additional fields, we need to remove them if added by the mergeOverwrite
|
||||
*/}}
|
||||
{{- define "argo-cd.strategy" -}}
|
||||
{{- $preset := . -}}
|
||||
{{- if (eq $preset.type "Recreate") }}
|
||||
type: Recreate
|
||||
{{- else if (eq $preset.type "RollingUpdate") }}
|
||||
type: RollingUpdate
|
||||
{{- with $preset.rollingUpdate }}
|
||||
rollingUpdate:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -12,6 +12,10 @@ metadata:
|
|||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
|
||||
spec:
|
||||
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.applicationSet.deploymentStrategy) }}
|
||||
strategy:
|
||||
{{- trim . | nindent 4 }}
|
||||
{{- end }}
|
||||
replicas: {{ .Values.applicationSet.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
||||
selector:
|
||||
|
|
|
@ -14,8 +14,10 @@ metadata:
|
|||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
||||
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.notifications.deploymentStrategy) }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
{{- trim . | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
|
||||
|
|
|
@ -11,6 +11,10 @@ metadata:
|
|||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
|
||||
spec:
|
||||
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.repoServer.deploymentStrategy) }}
|
||||
strategy:
|
||||
{{- trim . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.repoServer.autoscaling.enabled }}
|
||||
replicas: {{ .Values.repoServer.replicas }}
|
||||
{{- end }}
|
||||
|
|
|
@ -11,6 +11,10 @@ metadata:
|
|||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
spec:
|
||||
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.server.deploymentStrategy) }}
|
||||
strategy:
|
||||
{{- trim . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.server.autoscaling.enabled }}
|
||||
replicas: {{ .Values.server.replicas }}
|
||||
{{- end }}
|
||||
|
|
|
@ -12,6 +12,10 @@ metadata:
|
|||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
|
||||
spec:
|
||||
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.dex.deploymentStrategy) }}
|
||||
strategy:
|
||||
{{- trim . | nindent 4 }}
|
||||
{{- end }}
|
||||
replicas: 1
|
||||
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
||||
selector:
|
||||
|
|
|
@ -140,6 +140,12 @@ global:
|
|||
# -- The entrypoint to use for the containers.
|
||||
entrypoint: "entrypoint.sh"
|
||||
|
||||
# -- Deployment strategy for the all deployed Deployments
|
||||
deploymentStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
|
||||
## Argo Configs
|
||||
configs:
|
||||
|
@ -1093,6 +1099,13 @@ dex:
|
|||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# -- Deployment strategy to be added to the Dex server Deployment
|
||||
deploymentStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
|
||||
## Redis
|
||||
redis:
|
||||
# -- Enable redis
|
||||
|
@ -1665,6 +1678,13 @@ server:
|
|||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# -- Deployment strategy to be added to the server Deployment
|
||||
deploymentStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
|
||||
# TLS certificate configuration via cert-manager
|
||||
## Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/tls/#tls-certificates-used-by-argocd-server
|
||||
certificate:
|
||||
|
@ -2178,6 +2198,13 @@ repoServer:
|
|||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# -- Deployment strategy to be added to the repo server Deployment
|
||||
deploymentStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
|
||||
# -- Priority class for the repo server pods
|
||||
# @default -- `""` (defaults to global.priorityClassName)
|
||||
priorityClassName: ""
|
||||
|
@ -2518,6 +2545,13 @@ applicationSet:
|
|||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# -- Deployment strategy to be added to the ApplicationSet controller Deployment
|
||||
deploymentStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
|
||||
# -- Priority class for the ApplicationSet controller pods
|
||||
# @default -- `""` (defaults to global.priorityClassName)
|
||||
priorityClassName: ""
|
||||
|
@ -2776,6 +2810,10 @@ notifications:
|
|||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# -- Deployment strategy to be added to the notifications controller Deployment
|
||||
deploymentStrategy:
|
||||
type: Recreate
|
||||
|
||||
# -- Priority class for the notifications controller pods
|
||||
# @default -- `""` (defaults to global.priorityClassName)
|
||||
priorityClassName: ""
|
||||
|
|
Loading…
Reference in a new issue