ArgoCD Application声明式配置
  EeGZtZT5Jsfk 2023年11月02日 41 0

创建application

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server: https://kubernetes.default.svc
namespace: guestbook
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=false
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m

ArgoCD Application声明式配置_github


kubectl get analysisrun

创建应用集

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: clavaplus-api
namespace: argocd
spec:
generators:
- list:
elements:
- environment: test
k8surl: https://kubernetes.default.svc
repourl: http://10.0.7.63/operation_and_maintenance/test-config-repo.git
- environment: uat
k8surl: https://kubernetes.default.svc
repourl: http://10.0.7.63/operation_and_maintenance/uat-config-repo.git
template:
metadata:
name: '{{environment}}-clavaplus-api'
spec:
project: default
source:
repoURL: '{{repourl}}'
targetRevision: clavaplus-api
path: '{{environment}}'
destination:
server: '{{k8surl}}'
namespace: '{{environment}}-app'
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
- ApplyOutOfSyncOnly=true
- ServerSideApply=true
- RespectIgnoreDifferences=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
revisionHistoryLimit: 10


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  cOi2LVubBNG7   2023年11月02日   85   0   0 github服务器git
  nwrHrkoQE0C4   2023年11月02日   57   0   0 github负载均衡nginx
  8KhYbgszLLmZ   2023年11月02日   98   0   0 htmlgithubnginx
  5b99XfAwWKiH   2023年11月12日   35   0   0 githubC++openrmcfish
EeGZtZT5Jsfk