a1tan / argocdsecretsynchronizer

14 stars 3 forks source link

Invalid cluster when provisioning isn't fully done #5

Open mwienk opened 1 year ago

mwienk commented 1 year ago

The synchronizer synchronizes too early for my use case. Crossplane already creates a secret that contains the kubeconfig, but the caCert isn't correct yet. Crossplane updates it after the cluster is fully provisioned, but by that time the argocd cluster is already created with an invalid configuration. My current fix is to delete the argocd cluster secret and regenerate one by modifying a label on the kubeconfig secret, but I think the synchronizer should:

  1. Check if there is enough information in the secret, and only trigger when it finds enough information.
  2. Update the cluster when the original kubeconfig file gets updated, for instance when the caData is changed.

I would love to create a PR for this, but I'm not sure where to start as I have no experience with Golang/k8s operators development (yet).

a1tan commented 8 months ago

Sorry @mwienk, I haven't noticed this issue somehow. If it is still needed I can find some time to fix it. Please let me know.