Skip to main content

☑️ Ensure Application and AppProject are part of the argocd namespace

ArgoCD is installed in a specific namespace (by default it's 'argocd'). All of its resources, including Application and AppProject instances, have to be installed in that namespace.

NOTE: This rule will enforce using the 'argocd' namespace. If you wish to use another namespace and still want to enforce this rule, disable this rule in your dashboard and create a custom rule for your namespace.

Targeted objects by this rule (types of kind): AppProject / Application

Enabled by default? True

Policy as code identifier: ARGO_APP_PROJECT_INCORRECT_NAMESPACE_VALUE


This rule will fail

If the namespace key is not set, or set to a value other than 'argocd':

kind: Application
metadata:
namespace: myNamespace
kind: AppProject
metadata:
  labels:
    app.kubernetes.io/name: argocd-cm

Rule output in the CLI

$ datree test *.yaml

>> File: failExample.yaml
❌ Ensure Application and AppProject are part of the argocd namespace [1 occurrence]
💡 Incorrect value for property `namespace` - Application and AppProject have to be installed on the argocd namespace

How to fix this failure

Set the namespace key with a value of 'argocd':

kind: Application
metadata:
  namespace: argocd

Read more