crossplane-contrib/provider-argocd

server reference to a crossplane k8s cluster

tpickett opened this issue ยท 12 comments

Is there anyway to add a reference to a k8s cluster that is controlled through crossplane?

Could you be more specific on what you plan to do? To me it seems possible to do it within a composition in crossplane like in this example: https://github.com/janwillies/virtual-k8s-argocd/blob/main/crossplane/composition.yaml

My thought was to use the secret created with with cloud provider (i.e. provider-gcp) cluster resource to set up the provider-argo cluster resource. Much like the provider-helm does.
I was able to automatically add provider-gcp clusters to argo, but needed to used a custom argocd image that included gcloud. I think my limitation with auth could just be with gke, but the thought is the same: Allow a clusterRef attribute that ties the crossplane k8s cluster resource to a crossplane argo cluster resource (automatically setting up the cluster authentication for argo)

It is indeed a bit unfortunate that argocd doesn't accept a plain kubeconfig to describe a cluster. See also loft-sh/vcluster#226.

I wonder if this is something which provider-argocd could help with? It should be pretty straight forward to parse a kubeconfig and construct a valid cluster object, e.g.

  • cluster
    • caData and
    • server
  • user
    • certificate & key or
    • token

hi there, some news on that feature?

Isn't that a common need in GitOps world?
Or am I completely off track?

@exocode no one is working on this at the moment. Feel free open a PR if you want to start working on this.

@exocode no one is working on this at the moment. Feel free open a PR if you want to start working on this.

The thing is, that I'm not a Go developer. Normally I do JS and Ruby.. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 7 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

still relevant

If i'm just looking at the feature to get the .spec.serverAddr via a reference:
Would if be sufficient to treat the requirement like a secret and use a credential reference like with .spec.Credentials?

+1, this would save some manual steps that are needed instead of this

Folks, I can take a look at implementing this. It would point to something like a KubeconfigSecretRef *SecretReference that would contain data of the kubeconfig file generated by Crossplane Managed Resources.

deggja commented

Any update on this? Very sought after functionality!