diff --git a/charts/cluster-api-cluster-openstack/templates/workload.yaml b/charts/cluster-api-cluster-openstack/templates/workload.yaml index 78b5e6a..137d702 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 }} + {{- $configHeader := dict "apiVersion" "kubelet.config.k8s.io/v1beta1" -}} + {{- $configHeader := set $configHeader "kind" "KubeletConfiguration" -}} + {{- with $config := $pool.kubelet }} - 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, - } + {{ merge $configHeader $config | toJson }} + {{- end }} joinConfiguration: nodeRegistration: name: {{ "'{{ local_hostname }}'" }} 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: