这个警告通常是因为在app of apps(应用程序的应用程序)模式中,您的应用程序已被排除在外。要解决这个问题,您可以检查您的应用程序在哪些Setting和Placement规则中被排除。您可以尝试使用以下YAML文件来定义包含您的应用程序的应用程序和应用程序部署:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-of-apps
spec:
destination:
namespace: argocd
server: https://kubernetes.default.svc
project: default
source:
path: app-of-apps
repoURL: https://github.com//.git
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
spec:
destination:
namespace: my-app-ns
server: https://kubernetes.default.svc
project: default
source:
path: my-app
repoURL: https://github.com//.git
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-other-app
spec:
destination:
namespace: my-other-app-ns
server: https://kubernetes.default.svc
project: default
source:
path: my-other-app
repoURL: https://github.com//.git
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
在这个例子中,我们定义了3个应用程序:app-of-apps、my-app和my-other-app。我们通过app-of-apps来定义应用程序和应用程序部署的列表,然后使用Argo-CD同步这些应用程序和应用程序部署。
上一篇:Argo WorkflowTemplate 自由形式输入参数
下一篇:argo-serverpod的复制品未能在与postgres实例进行身份验证时导致`CrashLoopBackOff`pod状态。非复制品可以正常工作。