-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Multiple clusters with the same URL and different token may not be synchronized #9606
Comments
@shmurata would you share, what changes have you done in sync.go file? |
@pnieweglowski I got around this by changing to get clusters by name as follows.
```diff
diff --git a/controller/sync.go b/controller/sync.go
index a50aa1c0e..4dcdadce2 100644
--- a/controller/sync.go
+++ b/controller/sync.go
@@ -122,11 +122,14 @@ func (m *appStateManager) SyncAppState(app *v1alpha1.Application, state *v1alpha
return
}
+// GetClusterByName returns a cluster from a query
// GetProjectClusters return project scoped clusters by given project name
|
This is the first commit towards addressing argoproj#9606 Signed-off-by: Denys Vitali <denys.vitali@swisscom.com>
This is the first commit towards addressing argoproj#9606 Signed-off-by: Denys Vitali <denys.vitali@swisscom.com>
Checklist:
argocd version
.Describe the bug
Multiple clusters with the same URL and different token may not be synchronized.
App synchronization may fail if there are multiple clusters with the same URL and different token.
I don't think there is a way to set this up with the current ArgoCD in the case where there are not permissions for all namespaces in the cluster to which you are deploying, and you want to use different ServiceAccounts for each namespace for two or more namespaces.
To Reproduce
Application.Spec.Destination.Name
.Deployment may succeed or fail here.
If it fails, it is an authorization error and a different namespace token may be used.
Expected behavior
Expect deployments to be made using the settings for the cluster with the specified name each time.
Perhaps the cluster information retrieved in this line is being retrieved by URL only, causing the results to vary depending on the order of the clusters in the ArgoDB information.
https://github.com/argoproj/argo-cd/blob/v2.3.4/controller/sync.go#L125
This problem has been fixed by changing this part to get by Name.
Screenshots
Version
Paste the output from `argocd version` here. 2.3.4
Logs
The text was updated successfully, but these errors were encountered: