Open
Description
What steps did you take and what happened?
We have a (kubeadmcontrolplane
) template:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
spec:
template:
initConfiguration:
nodeRegistration:
imagePullPolicy: IfNotPresent
kubeletExtraArgs:
cloud-provider: external
name: '{{ local_hostname }}'
patches:
directory: /etc/kubernetes/patches
joinConfiguration:
nodeRegistration:
imagePullPolicy: IfNotPresent
kubeletExtraArgs:
cloud-provider: external
name: '{{ local_hostname }}'
before the change it was like this:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
spec:
template:
initConfiguration:
localAPIEndpoint: {}
nodeRegistration:
imagePullPolicy: IfNotPresent
kubeletExtraArgs:
cloud-provider: external
event-qps: "0"
feature-gates: SeccompDefault=true
protect-kernel-defaults: "true"
seccomp-default: "true"
tls-cipher-suites: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256
name: '{{ local_hostname }}'
patches:
directory: /etc/kubernetes/patches
joinConfiguration:
discovery: {}
nodeRegistration:
imagePullPolicy: IfNotPresent
kubeletExtraArgs:
cloud-provider: external
event-qps: "0"
feature-gates: SeccompDefault=true
protect-kernel-defaults: "true"
seccomp-default: "true"
tls-cipher-suites: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256
name: '{{ local_hostname }}'
as you can see we removed all kubeletExtraArgs
aside from cloud-provider
.
But the resource, in this case kubeadmcontrolplane
, still has these fields set, I assume because of a merge apply instead of completely overriding the resource.
This (might) result in a broken cluster which needs manual intervention if the removed fields are not valid anymore, which is the case for a few of these args.
What did you expect to happen?
That the resource (kubeadmcontrolplane
) would be the exact result of the template instead of a merged mess.
Cluster API version
1.8.5
Kubernetes version
1.28.15
Anything else you would like to add?
No response
Label(s) to be applied
/kind bug
/area clusterclass
Metadata
Metadata
Assignees
Labels
Issues or PRs related to clusterclassDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Categorizes issue or PR as related to a bug.Indicates an issue or PR lacks a `triage/foo` label and requires one.Lowest priority. Possibly useful, but not yet enough support to actually get it done.