fix: Refactor kustomize templates
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Danny Bessems 2023-07-06 13:00:08 +02:00
parent ef81cbfe6a
commit e2e009aa3c
2 changed files with 165 additions and 167 deletions

View File

@ -3,8 +3,8 @@ kind: Kustomization
resources: resources:
- cluster-template.yaml - cluster-template.yaml
patchesStrategicMerge: patches:
- |- - patch: |-
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@ -32,7 +32,7 @@ patchesStrategicMerge:
[Network] [Network]
public-network = "${VSPHERE_NETWORK}" public-network = "${VSPHERE_NETWORK}"
type: Opaque type: Opaque
- |- - patch: |-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane kind: KubeadmControlPlane
metadata: metadata:
@ -47,7 +47,7 @@ patchesStrategicMerge:
servers: servers:
- 0.nl.pool.ntp.org - 0.nl.pool.ntp.org
- 1.nl.pool.ntp.org - 1.nl.pool.ntp.org
- |- - patch: |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate kind: KubeadmConfigTemplate
metadata: metadata:
@ -63,7 +63,7 @@ patchesStrategicMerge:
servers: servers:
- 0.nl.pool.ntp.org - 0.nl.pool.ntp.org
- 1.nl.pool.ntp.org - 1.nl.pool.ntp.org
- |- - patch: |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate kind: KubeadmConfigTemplate
metadata: metadata:
@ -96,7 +96,7 @@ patchesStrategicMerge:
{{ _template.rootca | indent(width=14, first=False) | trim }} {{ _template.rootca | indent(width=14, first=False) | trim }}
owner: root:root owner: root:root
path: /usr/local/share/ca-certificates/root_ca.crt path: /usr/local/share/ca-certificates/root_ca.crt
- |- - patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate kind: VSphereMachineTemplate
metadata: metadata:
@ -115,7 +115,7 @@ patchesStrategicMerge:
nameservers: nameservers:
- {{ _template.network.dnsserver }} - {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}' networkName: '${VSPHERE_NETWORK}'
- |- - patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate kind: VSphereMachineTemplate
metadata: metadata:
@ -135,7 +135,6 @@ patchesStrategicMerge:
- {{ _template.network.dnsserver }} - {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}' networkName: '${VSPHERE_NETWORK}'
patchesJson6902:
- target: - target:
group: controlplane.cluster.x-k8s.io group: controlplane.cluster.x-k8s.io
version: v1beta1 version: v1beta1

View File

@ -5,8 +5,8 @@ resources:
- manifests/machinedeployment-{{ _template.cluster.name }}-worker.yaml - manifests/machinedeployment-{{ _template.cluster.name }}-worker.yaml
- manifests/vspheremachinetemplate-{{ _template.cluster.name }}-worker.yaml - manifests/vspheremachinetemplate-{{ _template.cluster.name }}-worker.yaml
patchesStrategicMerge: patches:
- |- - patch: |-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate kind: KubeadmConfigTemplate
metadata: metadata:
@ -31,7 +31,7 @@ patchesStrategicMerge:
mounts: mounts:
- - LABEL=blockstorage - - LABEL=blockstorage
- /mnt/blockstorage - /mnt/blockstorage
- |- - patch: |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate kind: VSphereMachineTemplate
metadata: metadata:
@ -43,7 +43,6 @@ patchesStrategicMerge:
additionalDisksGiB: additionalDisksGiB:
- {{ _template.nodepool.additionaldisk }} - {{ _template.nodepool.additionaldisk }}
patchesJson6902:
- target: - target:
group: bootstrap.cluster.x-k8s.io group: bootstrap.cluster.x-k8s.io
version: v1beta1 version: v1beta1