kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.54k stars 1.3k forks source link

CAPI Ovewrites coredns image #11301

Closed kotyara85 closed 1 hour ago

kotyara85 commented 2 hours ago

What steps did you take and what happened?

Hello everyone, I'm using capi 1.8.3 and deploying kube v1.30.3 without coredns addon, so it's installed by using a helm chart. Image repo for an official helm chart is different, what I've noticed is that something changes an image from coredns/coredns to registry.k8s.io/coredns

That stopped after I shutdown capi mgmt cluster 💀

Coredns helm chart and official have different format of image tags

What did you expect to happen?

Capi not to overwrite coredns image if coredns is set to skip

Cluster API version

1.8.3

Kubernetes version

1.30.3

Anything else you would like to add?

No response

Label(s) to be applied

/kind bug One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

k8s-ci-robot commented 2 hours ago

This issue is currently awaiting triage.

If CAPI contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
sbueringer commented 1 hour ago

You have set the "controlplane.cluster.x-k8s.io/skip-coredns" annotation on the KCP object and KCP is still modifying your CoreDNS Deployment?

That should be impossible, xref: https://github.com/kubernetes-sigs/cluster-api/blob/d86ba52721e8be732f7b1fb725cc8bab360af67e/controlplane/kubeadm/internal/workload_cluster_coredns.go#L109

kotyara85 commented 1 hour ago

You have set the "controlplane.cluster.x-k8s.io/skip-coredns" annotation on the KCP object and KCP is still modifying your CoreDNS Deployment?

That should be impossible, xref:

https://github.com/kubernetes-sigs/cluster-api/blob/d86ba52721e8be732f7b1fb725cc8bab360af67e/controlplane/kubeadm/internal/workload_cluster_coredns.go#L109

Hm, looks like I need to add that label to control planes, addition to skip step in kubeadm. Thanks

sbueringer commented 1 hour ago

Ah yup. I assumed you meant that annotation when you wrote "coredns is set to skip" :)

Please note, it's an annotation not a label.

kotyara85 commented 55 minutes ago

Ah yup. I assumed you meant that annotation when you wrote "coredns is set to skip" :)

Please note, it's an annotation not a label.

Yeah, I already have one for kube proxy. Haha. Thanks again!