Skip to content

Commit 29649fb

Browse files
committed
feat: add labels and taints for nodes
1 parent 321dce2 commit 29649fb

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

charts/capi-kamaji-vsphere/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: capi-kamaji-vsphere
2-
version: 0.1.1
2+
version: 0.1.2
33
appVersion: 1.31.0
44
description: A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API
55
and Kamaji.

charts/capi-kamaji-vsphere/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# capi-kamaji-vsphere
22

3-
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.31.0](https://img.shields.io/badge/AppVersion-1.31.0-informational?style=flat-square)
3+
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.31.0](https://img.shields.io/badge/AppVersion-1.31.0-informational?style=flat-square)
44

55
A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API and Kamaji.
66

@@ -65,7 +65,7 @@ A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API
6565
| nodePools[0].staticRoutes | list | `[]` | Static network routes if required |
6666
| nodePools[0].storagePolicyName | string | `""` | VSphere storage policy to use |
6767
| nodePools[0].template | string | `"ubuntu-2204-kube-v1.31.0"` | VSphere template to clone |
68-
| nodePools[0].users | list | `[{"name":"ubuntu","sshAuthorizedKeys":[],"sudo":"ALL=(ALL) NOPASSWD:ALL"}]` | Search domains suffixes if required searchDomains: [] # -- VM network domain if required domain: "" # -- IPv4 gateway if required gateway: "" # -- users to create on machines |
68+
| nodePools[0].users | list | `[{"name":"ubuntu","sshAuthorizedKeys":[],"sudo":"ALL=(ALL) NOPASSWD:ALL"}]` | users to create on machines |
6969
| vSphere.dataCenter | string | `"datacenter"` | Datacenter to use |
7070
| vSphere.insecure | bool | `false` | If vCenter uses a self-signed cert |
7171
| vSphere.password | string | `"changeme"` | vSphere password |

charts/capi-kamaji-vsphere/templates/_kubeadm-config-template.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ joinConfiguration:
55
kubeletExtraArgs:
66
node-ip: "{{`{{ ds.meta_data.local_ipv4 }}`}}"
77
cloud-provider: external
8+
{{- if and .nodePool (hasKey .nodePool "labels") }}
9+
node-labels: {{ .nodePool.labels | quote }}
10+
{{- end }}
11+
{{- if and .nodePool (hasKey .nodePool "taints") }}
12+
register-with-taints: {{ .nodePool.taints | quote }}
13+
{{- end }}
814
name: "{{`{{ local_hostname }}`}}"
915
preKubeadmCommands:
1016
- hostnamectl set-hostname "{{`{{ ds.meta_data.hostname }}`}}"

charts/capi-kamaji-vsphere/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,15 @@ nodePools:
151151
# domain: ""
152152
# # -- IPv4 gateway if required
153153
# gateway: ""
154-
# # -- users to create on machines
154+
# -- users to create on machines
155155
users:
156156
- name: ubuntu
157157
sshAuthorizedKeys: []
158158
sudo: ALL=(ALL) NOPASSWD:ALL
159+
# -- Labels to add to the node pool when joining the cluster
160+
# labels: "node.kubernetes.io/node=foo"
161+
# -- Taints to add to the node pool when joining the cluster
162+
# taints: "node.kubernetes.io/node:NoSchedule"
159163

160164
vSphereCloudControllerManager:
161165
# -- Installs vsphere-cloud-controller-manager on the management cluster

0 commit comments

Comments
 (0)