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

Unable to add multiple destinations to a project, when adding by cluster name. #10594

Closed
3 tasks done
sl1pm4t opened this issue Sep 15, 2022 · 0 comments · Fixed by #10595
Closed
3 tasks done

Unable to add multiple destinations to a project, when adding by cluster name. #10594

sl1pm4t opened this issue Sep 15, 2022 · 0 comments · Fixed by #10595
Labels
bug Something isn't working

Comments

@sl1pm4t
Copy link
Contributor

sl1pm4t commented Sep 15, 2022

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

When adding destinations to a project by cluster name instead of server address, it is not possible to add more than one cluster if the namespace is the same.
For example, let's assume we have two clusters called:

  • cluster-1
  • cluster-2

I want to authorise a project to manage the foo namespace in both of these clusters.
So I want to set the following destinations:

Server Name Namespace
blank cluster-1 foo
blank cluster-2 foo

When I hit save, the ArgoCD UI pops up an error that says the destination /foo already added.

The project validation only appears to consider the destination server address, which is blank in both cases, so the validation fails.
https://github.com/argoproj/argo-cd/blob/master/pkg/apis/application/v1alpha1/app_project_types.go#L169

To Reproduce

Steps to reproduce described above.

Expected behavior

I would expect the validation to accept prod-eks-01/foo and prod-k8s-02/foo as unique destinations.

Screenshots

argocd-add-destinations
argocd-already-added-error

Version

argocd: v2.4.0+91aefab
  BuildDate: 2022-06-10T17:23:37Z
  GitCommit: 91aefabc5b213a258ddcfe04b8e69bb4a2dd2566
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.4.11+3d9e9f2
  BuildDate: 2022-08-22T09:13:16Z
  GitCommit: 3d9e9f2f95b7801b90377ecfc4073e5f0f07205b
  GitTreeState: clean
  GoVersion: go1.18.5
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.4.1 2021-11-11T23:36:27Z
  Helm Version: v3.8.1+g5cb9af4
  Kubectl Version: v0.23.1
  Jsonnet Version: v0.18.0
@sl1pm4t sl1pm4t added the bug Something isn't working label Sep 15, 2022
crenshaw-dev pushed a commit that referenced this issue Oct 7, 2022
…10594)

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
crenshaw-dev pushed a commit that referenced this issue Oct 7, 2022
…10594)

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
crenshaw-dev pushed a commit that referenced this issue Oct 7, 2022
…10594)

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
crenshaw-dev pushed a commit that referenced this issue Oct 7, 2022
…10594)

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
crenshaw-dev pushed a commit that referenced this issue Oct 7, 2022
…10594)

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant