diff --git a/charts/cluster-api-cluster-openstack/templates/workload.yaml b/charts/cluster-api-cluster-openstack/templates/workload.yaml index 78b5e6a..53c2ca4 100644 --- a/charts/cluster-api-cluster-openstack/templates/workload.yaml +++ b/charts/cluster-api-cluster-openstack/templates/workload.yaml @@ -107,16 +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: | - { - "apiVersion": "kubelet.config.k8s.io/v1beta1", - "kind": "KubeletConfiguration", - "serializeImagePulls": false, - "maxParallelImagePulls": 10, - } + {{ $config | toJson }} + {{- end }} joinConfiguration: nodeRegistration: name: {{ "'{{ local_hostname }}'" }} @@ -125,6 +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: