Skip to content
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

kubeconfig secret is created with the wrong type #92

Closed
hexchen opened this issue Apr 19, 2024 · 3 comments · Fixed by #96
Closed

kubeconfig secret is created with the wrong type #92

hexchen opened this issue Apr 19, 2024 · 3 comments · Fixed by #96
Labels
bug Something isn't working
Milestone

Comments

@hexchen
Copy link
Contributor

hexchen commented Apr 19, 2024

By convention it should be of the type cluster.x-k8s.io/secret instead of Opaque when getting copied from the TenantControlPlane-managed secret.

@prometherion
Copy link
Member

Thanks for opening this, @hexchen!

May I ask you what's the impact level of this bug? So far I'm running Kamaji on CAPI v1.5 with no issues, even tho the type is potentially wrong.

@hexchen
Copy link
Contributor Author

hexchen commented Apr 19, 2024

Some external operators (the one I am having problems with is https://github.com/dntosas/capi2argo-cluster-operator) expect that type to determine that it is in fact a valid cluster-api kubeconfig. In this case, this leads to the operator not copying the kubeconfig into an argocd secret.

For reference, this is how the kubeadm control plane provider generates this secret: https://github.com/kubernetes-sigs/cluster-api/blob/main/util/kubeconfig/kubeconfig.go#L133

I'm happy to implement this change and open a PR for it, but since it is changed behaviour, I wanted to clear it with the maintainer first before implementing it.

@prometherion
Copy link
Member

prometherion commented Apr 23, 2024

I don't see any problem in changing the Secret type, that would work for new clusters, but we need to document this properly since the Type is immutable:

type: Invalid value: "cluster.x-k8s.io/secret": field is immutable

If you're open to implementing the change, happy to receive more contributions of yours 🎉

The plan is to release this for v0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants