diff --git a/charts/cluster-api-cluster-openstack/templates/control-plane.yaml b/charts/cluster-api-cluster-openstack/templates/control-plane.yaml index 72352f0..2c4f685 100644 --- a/charts/cluster-api-cluster-openstack/templates/control-plane.yaml +++ b/charts/cluster-api-cluster-openstack/templates/control-plane.yaml @@ -22,6 +22,7 @@ spec: name: {{ "'{{ local_hostname }}'" }} kubeletExtraArgs: cloud-provider: external + serialize-image-pulls: "true" node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }} taints: {{- include "openstack.taints.control-plane" . | nindent 8 }} @@ -34,6 +35,7 @@ spec: name: {{ "'{{ local_hostname }}'" }} kubeletExtraArgs: cloud-provider: external + serialize-image-pulls: "true" node-labels: {{- include "openstack.nodelabels.control-plane" . | nindent 12 }} taints: {{- include "openstack.taints.control-plane" . | nindent 8 }} diff --git a/charts/cluster-api-cluster-openstack/templates/workload.yaml b/charts/cluster-api-cluster-openstack/templates/workload.yaml index 165e2f1..53c2ca4 100644 --- a/charts/cluster-api-cluster-openstack/templates/workload.yaml +++ b/charts/cluster-api-cluster-openstack/templates/workload.yaml @@ -107,6 +107,15 @@ spec: path: {{ $file.path }} permissions: "0600" {{- end }} + {{- with $config := $pool.kubelet -}} + {{ $_ := set $config "apiVersion" "kubelet.config.k8s.io/v1beta1" -}} + {{ $_ := set $config "kind" "KubeletConfiguration" }} + - path: /etc/kubernetes/patches/kubeletconfiguration0+strategic.json + owner: "root:root" + permissions: "0644" + content: | + {{ $config | toJson }} + {{- end }} joinConfiguration: nodeRegistration: name: {{ "'{{ local_hostname }}'" }} @@ -115,4 +124,8 @@ spec: node-labels: {{- include "openstack.nodelabels.workload" $context | nindent 14 }} taints: {{- include "openstack.taints.workload" $ | nindent 10 }} + {{- if $pool.kubelet }} + patches: + directory: /etc/kubernetes/patches + {{- end }} {{- end }} diff --git a/charts/cluster-api-cluster-openstack/values.yaml b/charts/cluster-api-cluster-openstack/values.yaml index 38ad648..1960aaa 100644 --- a/charts/cluster-api-cluster-openstack/values.yaml +++ b/charts/cluster-api-cluster-openstack/values.yaml @@ -138,6 +138,11 @@ controlPlane: # - path: /etc/cat # content: bWVvdw== # +# # Additional configuration to be passed to the kubelet can be specifed here +# kubelet: +# # For example: +# serializeImagePulls: "false" +# # # Enable or disable cluster autoscaling. # # This object is considered immutable. # autoscaling: