Add GitOps documentation and ArgoCD application config
This commit is contained in:
33
k3s/argocd-app.yaml
Normal file
33
k3s/argocd-app.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: k3s-apps
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
|
||||
# Git 仓库配置
|
||||
source:
|
||||
repoURL: https://git.u9.net3w.com/admin/k3s-configs.git
|
||||
targetRevision: HEAD
|
||||
path: k3s
|
||||
|
||||
# 目标集群配置
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: default
|
||||
|
||||
# 自动同步配置
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true # 自动删除 Git 中不存在的资源
|
||||
selfHeal: true # 自动修复被手动修改的资源
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true # 自动创建命名空间
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 5s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
Reference in New Issue
Block a user