Open rafaeltovargarrido opened 1 year ago
I don't quite understand. Argo CD does not create any user, it will reconcile your manifests to a cluster, and from there some other controller will pick it up and do something with it.
I'm not familiar with the SQLUser
API, but how does the config connector pick up changes to this resource? Is the SQLUser
resource deleted somehow and then getting recreated by Argo CD, thereby triggering the creation of a user?
If I delete all the kinds SqlUser from the manifest of argo and recreate again outside argo the calls to sql api aren't any more there.
Can it be this that is causing your issue? https://cloud.google.com/config-connector/docs/concepts/ignore-unspecified-fields#resolve_fighting_between_config_management_tools_and
Thanks, @blakepettersson I think you are totally right, but SQLUser doesn't support that flag.
Error from server: error when creating "SQLUser-3d242eb873908c34c7084bd5c66e2224.yaml": admission webhook "generic-defaulter.cnrm.cloud.google.com" denied the request: error validating or defaulting 'cnrm.cloud.google.com/state-into-spec' annotation: kind 'SQLUser' does not support having annotation 'cnrm.cloud.google.com/state-into-spec' set to value 'absent'
It might be worthwhile to submit your query to the k8s-config-connector project directly, there's likely some drift between the Argo CD SQLUser
definition and the reconciled SQLUser
that has been created by the k8s-config-connector controller.
You can also try to turn off auto-sync for the Application
containing the SQLUser
definition, run refresh and see what the diff is between the live SQLUser
object and whatever is in Git.
I already try the second one and there is no such of diff. I appreciate your help will create a ticket for google.
Could be relevant: #14426
As well as GoogleCloudPlatform/k8s-config-connector#837
Checklist:
argocd version
.Describe the bug We have config connector in our gke cluster to handle all the gcp resources in our infra, we use this kind sqlusers.sql.cnrm.cloud.google.com to create SQL user for our database. The issue is argo is calling the creation of the user every minute as you can see in the image I posted.
To Reproduce
Expected behavior Argo create the user and that is all.
Screenshots
Version
argocd: v2.5.5+fc3eaec BuildDate: 2022-12-16T16:34:36Z GitCommit: fc3eaec6f498ddbe49a5fa9d215a219191fba02f GitTreeState: clean GoVersion: go1.18.9 Compiler: gc Platform: linux/amd64 argocd-server: v2.5.5+fc3eaec BuildDate: 2022-12-16T16:34:36Z GitCommit: fc3eaec6f498ddbe49a5fa9d215a219191fba02f GitTreeState: clean GoVersion: go1.18.9 Compiler: gc Platform: linux/amd64 Kustomize Version: could not get kustomize version: exec: "kustomize": executable file not found in $PATH Helm Version: v3.10.3+g835b733 Kubectl Version: v0.24.2 Jsonnet Version: v0.18.0
Logs