Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster-addons application name duplication #78

Open
nikitad-fanatics opened this issue Feb 10, 2025 · 1 comment
Open

cluster-addons application name duplication #78

nikitad-fanatics opened this issue Feb 10, 2025 · 1 comment

Comments

@nikitad-fanatics
Copy link

Description

I use hub and spoke topology setup for ArgoCD from this example https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/multi-cluster/hub-spoke-irsa.
There is an issue when a spoke cluster connected, cluster-addons application can not provision addons from appsets to a new destination.
I found error log in ApplicationSet Controller:

{"applicationset":{"Namespace":"argocd","Name":"cluster-addons"},"level":"error","msg":"validation error found during application validation: ApplicationSet cluster-addons contains applications with duplicate name: cluster-addons","time":""

ArgoCD version 2.14.

Question

  1. Is it a bug in an example and bootstrap appset cluster-addons should have dynamic generated name for application cluster-addons per spoke cluster?
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cluster-addons
  namespace: argocd
spec:
  syncPolicy:
    preserveResourcesOnDeletion: true
  generators:
    - clusters:
        selector:
          matchExpressions:
            - key: akuity.io/argo-cd-cluster-name
              operator: NotIn
              values: [in-cluster]
  template:
    metadata:
      name: 'cluster-addons-{{name}}'
    spec:
      project: default
      source:
  1. I was able to fix it to instruct install cluster-addons application only for hub cluster. Is it the right solution?
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cluster-addons
  namespace: argocd
spec:
  syncPolicy:
    preserveResourcesOnDeletion: true
  generators:
    - clusters:
   - clusters:
        selector:
          matchLabels:
            environment: control-plane
@nikitad-fanatics
Copy link
Author

@csantanapr could you give advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant