feat(argocd-apps): Add rollout strategy for ApplicationSet (#2063)
feat(argocd-apps): add rollout strategy for ApplicationSet Signed-off-by: Khue Doan <mail@khuedoan.com>
This commit is contained in:
parent
be8a4c9729
commit
650a9ec7ef
4 changed files with 66 additions and 3 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: argocd-apps
|
name: argocd-apps
|
||||||
description: A Helm chart for managing additional Argo CD Applications and Projects
|
description: A Helm chart for managing additional Argo CD Applications and Projects
|
||||||
type: application
|
type: application
|
||||||
version: 1.1.0
|
version: 1.2.0
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
keywords:
|
keywords:
|
||||||
|
@ -18,4 +18,4 @@ annotations:
|
||||||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: added
|
- kind: added
|
||||||
description: Generate application, applicationset, project with template
|
description: Rollout strategy for ApplicationSet
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Test applicationsets with Progressive Syncs
|
||||||
|
|
||||||
|
applicationsets:
|
||||||
|
- name: applicationset-progressive-syncs
|
||||||
|
generators:
|
||||||
|
- list:
|
||||||
|
elements:
|
||||||
|
- cluster: engineering-dev
|
||||||
|
url: https://1.2.3.4
|
||||||
|
env: env-dev
|
||||||
|
- cluster: engineering-prod
|
||||||
|
url: https://9.8.7.6/
|
||||||
|
env: env-prod
|
||||||
|
strategy:
|
||||||
|
type: RollingSync
|
||||||
|
rollingSync:
|
||||||
|
steps:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: envLabel
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- env-dev
|
||||||
|
- matchExpressions:
|
||||||
|
- key: envLabel
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- env-prod
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{.cluster}}-guestbook'
|
||||||
|
labels:
|
||||||
|
envLabel: '{{.env}}'
|
||||||
|
spec:
|
||||||
|
project: my-project
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/argoproj/argocd-example-apps.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: guestbook/{{.cluster}}
|
||||||
|
destination:
|
||||||
|
server: '{{.url}}'
|
||||||
|
namespace: guestbook
|
|
@ -26,6 +26,10 @@ spec:
|
||||||
generators:
|
generators:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .strategy }}
|
||||||
|
strategy:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
{{- with .syncPolicy }}
|
{{- with .syncPolicy }}
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
|
|
|
@ -103,10 +103,28 @@ applicationsets: []
|
||||||
# directories:
|
# directories:
|
||||||
# - path: guestbook
|
# - path: guestbook
|
||||||
# - path: kustomize-*
|
# - path: kustomize-*
|
||||||
|
# # Progressive Syncs is an experimental feature and it must be explicitly enabled
|
||||||
|
# # Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Progressive-Syncs/#enabling-progressive-syncs
|
||||||
|
# strategy:
|
||||||
|
# type: RollingSync
|
||||||
|
# rollingSync:
|
||||||
|
# steps:
|
||||||
|
# - matchExpressions:
|
||||||
|
# - key: project
|
||||||
|
# operator: In
|
||||||
|
# values:
|
||||||
|
# - guestbook
|
||||||
|
# - matchExpressions:
|
||||||
|
# - key: project
|
||||||
|
# operator: In
|
||||||
|
# values:
|
||||||
|
# - kustomize-foo
|
||||||
|
# - kustomize-bar
|
||||||
# template:
|
# template:
|
||||||
# metadata:
|
# metadata:
|
||||||
# name: '{{path.basename}}'
|
# name: '{{path.basename}}'
|
||||||
# labels: {}
|
# labels:
|
||||||
|
# project: '{{path.basename}}'
|
||||||
# annotations: {}
|
# annotations: {}
|
||||||
# spec:
|
# spec:
|
||||||
# project: default
|
# project: default
|
||||||
|
|
Loading…
Reference in a new issue