ArgoCD Application Names Must Be Unique Within a Namespace

Understanding application name uniqueness in ArgoCD and Akuity’s App In Any Namespace feature.

In ArgoCD, application names must be unique within the same namespace. Traditionally, all applications are stored in the argocd namespace, meaning each application name must be globally unique within that namespace.

Application Name Uniqueness

  • You do not necessarily have to include all project variables (e.g., fproject-foozer-env1) in the application name.
  • However, each application must have a unique name within its namespace.

Akuity’s App In Any Namespace Feature

  • Now, applications can be deployed in any namespace rather than being restricted to argocd.
  • This allows the same application name to be used in multiple namespaces.
  • In the UI, the application will appear as namespace/app-name.
    appinAnyns

Example: Using App In Any Namespace

Here’s an example of defining an application in a custom namespace (test):

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  labels:
    cluster: prod
  name: helm-guestbook
  namespace: test
spec:
  destination:
    namespace: any-guestbook
    server: http://cluster-prod:8001
  project: default
  source:
    path: helm-guestbook
    repoURL: https://github.com/argoproj/argocd-example-apps.git
    targetRevision: HEAD
  syncPolicy:
    automated: {}
  syncOptions:
    - CreateNamespace=true

For more details, refer to the official documentation:

🔗 App In Any Namespace Feature