provider-argocd icon indicating copy to clipboard operation
provider-argocd copied to clipboard

server reference to a crossplane k8s cluster

Open tpickett opened this issue 3 years ago • 6 comments

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

tpickett avatar Dec 09 '21 23:12 tpickett

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

Benedikt1992 avatar Dec 13 '21 09:12 Benedikt1992

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)

tpickett avatar Dec 15 '21 02:12 tpickett

It is indeed a bit unfortunate that argocd doesn't accept a plain kubeconfig to describe a cluster. See also https://github.com/loft-sh/vcluster/issues/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

janwillies avatar Jan 17 '22 11:01 janwillies

hi there, some news on that feature?

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

exocode avatar Jul 15 '22 21:07 exocode

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

MisterMX avatar Sep 14 '22 14:09 MisterMX

@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.. 🤷🏻‍♂️

exocode avatar Sep 14 '22 14:09 exocode

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.

github-actions[bot] avatar Dec 14 '22 02:12 github-actions[bot]

still relevant

janwillies avatar Dec 22 '22 09:12 janwillies

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?

maximilianbraun avatar Mar 21 '23 10:03 maximilianbraun

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

Roman-Simik avatar May 01 '23 17:05 Roman-Simik

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.

stevendborrelli avatar May 25 '23 22:05 stevendborrelli

Any update on this? Very sought after functionality!

deggja avatar Aug 14 '23 08:08 deggja