From 1f6d7181eb1095dd4cbd7eef6fcb315cb1f85aae Mon Sep 17 00:00:00 2001 From: Nick Jones Date: Wed, 6 Nov 2024 16:20:50 +0000 Subject: [PATCH] [wip] First pass at making this into a template --- .../templates/workload.yaml | 11 +++++------ charts/cluster-api-cluster-openstack/values.yaml | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/cluster-api-cluster-openstack/templates/workload.yaml b/charts/cluster-api-cluster-openstack/templates/workload.yaml index 78b5e6a..5b1c82d 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 }}'" }} 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: