98 lines
3.2 KiB
YAML
98 lines
3.2 KiB
YAML
|
|
{{- $clustername := .Values.cluster.name -}}
|
||
|
|
{{- if eq .Values.cloudprovider "vsphere" }}
|
||
|
|
{{- range $index, $nodepool := .Values.nodepools }}
|
||
|
|
apiVersion: rke-machine-config.cattle.io/v1
|
||
|
|
kind: VmwarevsphereConfig
|
||
|
|
metadata:
|
||
|
|
name: {{ $clustername }}-{{ $nodepool.name }}
|
||
|
|
namespace: fleet-default
|
||
|
|
common:
|
||
|
|
{{- if $nodepool.labels }}
|
||
|
|
labels:
|
||
|
|
{{ toYaml $nodepool.labels | indent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- if $nodepool.taints }}
|
||
|
|
taints:
|
||
|
|
{{ toYaml $nodepool.taints | indent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- if $nodepool.cfgparam }}
|
||
|
|
cfgparam: {{ $nodepool.cfgparam }}
|
||
|
|
{{- end }}
|
||
|
|
cloneFrom: {{ $nodepool.cloneFrom }}
|
||
|
|
cloudConfig: |-
|
||
|
|
{{ $nodepool.cloudConfig | indent 2 }}
|
||
|
|
cloudinit: {{ $nodepool.cloudinit }}
|
||
|
|
contentLibrary: {{ $nodepool.contentLibrary }}
|
||
|
|
cpuCount: {{ $nodepool.cpuCount | squote }}
|
||
|
|
creationType: {{ $nodepool.creationType }}
|
||
|
|
customAttribute: {{ $nodepool.customAttribute }}
|
||
|
|
datacenter: {{ $nodepool.datacenter }}
|
||
|
|
datastore: {{ $nodepool.datastore }}
|
||
|
|
datastoreCluster: {{ $nodepool.datastoreCluster }}
|
||
|
|
diskSize: {{ $nodepool.diskSize | squote }}
|
||
|
|
folder: {{ $nodepool.folder }}
|
||
|
|
hostsystem: {{ $nodepool.hostsystem }}
|
||
|
|
memorySize: {{ $nodepool.memorySize | squote }}
|
||
|
|
network: {{ $nodepool.network }}
|
||
|
|
pool: {{ $nodepool.pool }}
|
||
|
|
sshPort: {{ $nodepool.sshPort | squote }}
|
||
|
|
sshUser: {{ $nodepool.sshUser }}
|
||
|
|
sshUserGroup: {{ $nodepool.sshUserGroup }}
|
||
|
|
tag: {{ $nodepool.tag }}
|
||
|
|
vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }}
|
||
|
|
vappIpprotocol: {{ $nodepool.vappIpprotocol }}
|
||
|
|
vappProperty: {{ $nodepool.vappProperty }}
|
||
|
|
vappTransport: {{ $nodepool.vappTransport }}
|
||
|
|
vcenter: {{ $nodepool.vcenter }}
|
||
|
|
vcenterPort: {{ $nodepool.vcenterPort | squote }}
|
||
|
|
---
|
||
|
|
{{- end }}
|
||
|
|
{{ $nodepool := .Values.nodepool }}
|
||
|
|
{{- if $nodepool }}
|
||
|
|
apiVersion: rke-machine-config.cattle.io/v1
|
||
|
|
kind: VmwarevsphereConfig
|
||
|
|
metadata:
|
||
|
|
name: {{ $clustername }}-{{ $nodepool.name }}
|
||
|
|
namespace: fleet-default
|
||
|
|
common:
|
||
|
|
{{- if $nodepool.labels }}
|
||
|
|
labels:
|
||
|
|
{{ toYaml $nodepool.labels | indent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- if $nodepool.taints }}
|
||
|
|
taints:
|
||
|
|
{{ toYaml $nodepool.taints | indent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- if $nodepool.cfgparam }}
|
||
|
|
cfgparam: {{ $nodepool.cfgparam }}
|
||
|
|
{{- end }}
|
||
|
|
cloneFrom: {{ $nodepool.cloneFrom }}
|
||
|
|
cloudConfig: |-
|
||
|
|
{{ $nodepool.cloudConfig | indent 2 }}
|
||
|
|
cloudinit: {{ $nodepool.cloudinit }}
|
||
|
|
contentLibrary: {{ $nodepool.contentLibrary }}
|
||
|
|
cpuCount: {{ $nodepool.cpuCount | squote }}
|
||
|
|
creationType: {{ $nodepool.creationType }}
|
||
|
|
customAttribute: {{ $nodepool.customAttribute }}
|
||
|
|
datacenter: {{ $nodepool.datacenter }}
|
||
|
|
datastore: {{ $nodepool.datastore }}
|
||
|
|
datastoreCluster: {{ $nodepool.datastoreCluster }}
|
||
|
|
diskSize: {{ $nodepool.diskSize | squote }}
|
||
|
|
folder: {{ $nodepool.folder }}
|
||
|
|
hostsystem: {{ $nodepool.hostsystem }}
|
||
|
|
memorySize: {{ $nodepool.memorySize | squote }}
|
||
|
|
network: {{ $nodepool.network }}
|
||
|
|
pool: {{ $nodepool.pool }}
|
||
|
|
sshPort: {{ $nodepool.sshPort | squote }}
|
||
|
|
sshUser: {{ $nodepool.sshUser }}
|
||
|
|
sshUserGroup: {{ $nodepool.sshUserGroup }}
|
||
|
|
tag: {{ $nodepool.tag }}
|
||
|
|
vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }}
|
||
|
|
vappIpprotocol: {{ $nodepool.vappIpprotocol }}
|
||
|
|
vappProperty: {{ $nodepool.vappProperty }}
|
||
|
|
vappTransport: {{ $nodepool.vappTransport }}
|
||
|
|
vcenter: {{ $nodepool.vcenter }}
|
||
|
|
vcenterPort: {{ $nodepool.vcenterPort | squote }}
|
||
|
|
{{- end }}
|
||
|
|
{{- end }}
|