apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - manifests/kubeadmconfigtemplate-{{ _template.cluster.name }}-worker.yaml - manifests/machinedeployment-{{ _template.cluster.name }}-worker.yaml - manifests/vspheremachinetemplate-{{ _template.cluster.name }}-worker.yaml patches: - patch: |- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: name: {{ _template.cluster.name }}-worker namespace: default spec: template: spec: diskSetup: filesystems: - device: /dev/sdb1 filesystem: ext4 label: blockstorage partitions: - device: /dev/sdb layout: true tableType: gpt joinConfiguration: nodeRegistration: kubeletExtraArgs: node-labels: "node.longhorn.io/create-default-disk=true" mounts: - - LABEL=blockstorage - /mnt/blockstorage - patch: |- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate metadata: name: {{ _template.cluster.name }}-worker namespace: default spec: template: spec: additionalDisksGiB: - {{ _template.nodepool.additionaldisk }} - target: group: bootstrap.cluster.x-k8s.io version: v1beta1 kind: KubeadmConfigTemplate name: {{ _template.cluster.name }}-worker patch: |- - op: replace path: /metadata/name value: {{ _template.cluster.name }}-worker-storage - target: group: cluster.x-k8s.io version: v1beta1 kind: MachineDeployment name: {{ _template.cluster.name }}-worker patch: |- - op: replace path: /metadata/name value: {{ _template.cluster.name }}-worker-storage - op: replace path: /spec/template/spec/bootstrap/configRef/name value: {{ _template.cluster.name }}-worker-storage - op: replace path: /spec/template/spec/infrastructureRef/name value: {{ _template.cluster.name }}-worker-storage - op: replace path: /spec/replicas value: {{ _template.nodepool.size }} - target: group: infrastructure.cluster.x-k8s.io version: v1beta1 kind: VSphereMachineTemplate name: {{ _template.cluster.name }}-worker patch: |- - op: replace path: /metadata/name value: {{ _template.cluster.name }}-worker-storage