From 935cb175747ad22bf3e5b67d599bb08c3cb78485 Mon Sep 17 00:00:00 2001 From: Igor Blackman Date: Wed, 4 Dec 2024 13:13:05 -0300 Subject: [PATCH] feat(clusterapi-resources): Add params to set apiServer and controllerManager extraArgs (#34) ### PR Description Please replace this with a high level description of what this PR is supposed to accomplish. ### Checklist - [x] Have you reviewed and updated the chart default values if necessary? - [ ] Have you reviewed and updated the chart documentation if necessary? - [ ] Does your branch follow the naming convention of `{chartNameWithDashes}-v{versionString}-{optionalPatchVersion}`? - [ ] Have you bumped the version in the chart's `Chart.yaml`? ### Tagged Releases Please remember to make a tagged release after merging your PR that: - Has a tag name that matches your PR branch name (see above) - Has a description that summarizes the changes made This makes it possible to use previous versions of the charts maintained here as new releases are published. Please see the release history of this repository for examples. Signed-off-by: Igor Valente Blackman --- .../templates/KubeadmControlPlane.yaml | 6 ++++++ charts/clusterapi-resources/values.yaml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/charts/clusterapi-resources/templates/KubeadmControlPlane.yaml b/charts/clusterapi-resources/templates/KubeadmControlPlane.yaml index 087b20d..52c19b0 100644 --- a/charts/clusterapi-resources/templates/KubeadmControlPlane.yaml +++ b/charts/clusterapi-resources/templates/KubeadmControlPlane.yaml @@ -10,9 +10,15 @@ spec: apiServer: extraArgs: cloud-provider: external + {{- with .Values.kubeadmConfigSpec.apiServer.extraArgs }} + {{- toYaml . | nindent 10 }} + {{- end }} controllerManager: extraArgs: cloud-provider: external + {{- with .Values.kubeadmConfigSpec.controllerManager.extraArgs }} + {{- toYaml . | nindent 10 }} + {{- end }} {{- with .Values.kubeadmConfigSpec.files }} files: {{- toYaml . | nindent 4 }} diff --git a/charts/clusterapi-resources/values.yaml b/charts/clusterapi-resources/values.yaml index e9d6068..14046c0 100644 --- a/charts/clusterapi-resources/values.yaml +++ b/charts/clusterapi-resources/values.yaml @@ -66,6 +66,16 @@ vsphereMachineTemplate: # template: ubuntu-2204-kube-v1.30.0 kubeadmConfigSpec: + ## Extra args for kubeadm apiServer + apiServer: + extraArgs: {} + # extra1: value1 + # extra2: value2 + ## Extra args for kubeadm controllerManager + controllerManager: + extraArgs: {} + # extra1: value1 + # extra2: value2 preKubeadmCommands: - hostnamectl set-hostname "{{ ds.meta_data.hostname }}" - echo "::1 ipv6-localhost ipv6-loopback localhost6 localhost6.localdomain6" >/etc/hosts