2023-04-06 11:29:29 +00:00
|
|
|
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
|
|
|
|
|
2023-07-06 10:58:31 +00:00
|
|
|
patches:
|
|
|
|
- patch: |-
|
2023-04-06 11:29:29 +00:00
|
|
|
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
|
2023-04-18 19:50:26 +00:00
|
|
|
joinConfiguration:
|
|
|
|
nodeRegistration:
|
|
|
|
kubeletExtraArgs:
|
|
|
|
node-labels: "node.longhorn.io/create-default-disk=true"
|
2023-04-06 11:29:29 +00:00
|
|
|
mounts:
|
|
|
|
- - LABEL=blockstorage
|
|
|
|
- /mnt/blockstorage
|
2023-07-06 10:58:31 +00:00
|
|
|
- patch: |-
|
2023-04-07 08:29:41 +00:00
|
|
|
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
|
|
|
|
kind: VSphereMachineTemplate
|
|
|
|
metadata:
|
|
|
|
name: {{ _template.cluster.name }}-worker
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
additionalDisksGiB:
|
|
|
|
- {{ _template.nodepool.additionaldisk }}
|
2023-04-06 11:29:29 +00:00
|
|
|
|
2023-07-06 10:58:31 +00:00
|
|
|
- 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
|
2023-04-06 11:29:29 +00:00
|
|
|
|
2023-07-06 10:58:31 +00:00
|
|
|
- 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 }}
|
2023-04-06 11:29:29 +00:00
|
|
|
|
2023-07-06 10:58:31 +00:00
|
|
|
- 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
|