From f65e1d059e401b4ff58eef32537d0735ef71bda7 Mon Sep 17 00:00:00 2001 From: "justin.schaefer" Date: Tue, 1 Oct 2024 14:22:52 -0500 Subject: [PATCH 1/5] WIP: first pass at working example of values-vsphere.yaml --- charts/cluster-templates/values-vsphere.yaml | 49 ++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 charts/cluster-templates/values-vsphere.yaml diff --git a/charts/cluster-templates/values-vsphere.yaml b/charts/cluster-templates/values-vsphere.yaml new file mode 100644 index 0000000..55e21fd --- /dev/null +++ b/charts/cluster-templates/values-vsphere.yaml @@ -0,0 +1,49 @@ +cloudCredentialSecretName: cc-xxxxx # You can find or create this secret in Cluster Management -> Cloud Credentials +cloudprovider: vsphere + +### Configure information about the cluster you are creating here +cluster: + name: exampleCluster + kubernetesVersion: v1.28.13+k3s1 + +### Configure information about vCenter +vcenter: + host: "vcenter.lab" + # BUG: Though these have default values defined in cluster.yaml, they will render the following error: + # nil pointer evaluating interface {}.asyncQueryVolume + # You must provide these values for now (10/01/2024) + vsphere: + asyncQueryVolume: + enabled: true + csiController: + csiResizer: + enabled: true + improvedVolumeTopology: + enabled: true + onlineVolumeExtend: + enabled: true + triggerCsiFullsync: + enabled: true + +# Rancher Manager URL +rancher: + cattle: + url: "rancher.example.com" + +# For a complete list of config options, please look here: +# https://github.com/rancherfederal/rancher-cluster-templates/blob/customWork/charts/cluster-templates/templates/nodeconfig-vsphere.yaml +nodepools: + - name: "control-plane" + quantity: 1 + datacenter: "/Datacenter" + datastore: "/Datacenter/datastore/vsanDatastore" + cloneFrom: "/Datacenter/vm/Rocky9.4-minimal" + etcd: true + controlplane: true + worker: true + cpuCount: 2 + diskSize: 20000 + memorySize: 4096 + cloudConfig: | + #cloud-config + echo "Put your cloud config here" From 26f63fc9b527f78ff7376ee80d7f73f67a68ea6f Mon Sep 17 00:00:00 2001 From: "justin.schaefer" Date: Tue, 1 Oct 2024 14:28:01 -0500 Subject: [PATCH 2/5] Stringify strings/rm trailing ws --- charts/cluster-templates/values-vsphere.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/cluster-templates/values-vsphere.yaml b/charts/cluster-templates/values-vsphere.yaml index 55e21fd..cfea687 100644 --- a/charts/cluster-templates/values-vsphere.yaml +++ b/charts/cluster-templates/values-vsphere.yaml @@ -1,10 +1,10 @@ -cloudCredentialSecretName: cc-xxxxx # You can find or create this secret in Cluster Management -> Cloud Credentials -cloudprovider: vsphere +cloudCredentialSecretName: "cc-xxxxx" # You can find or create this secret in Cluster Management -> Cloud Credentials +cloudprovider: "vsphere" ### Configure information about the cluster you are creating here cluster: - name: exampleCluster - kubernetesVersion: v1.28.13+k3s1 + name: "exampleCluster" + kubernetesVersion: "v1.28.13+k3s1" ### Configure information about vCenter vcenter: From 70653ff0353833972f920a6866b23771a3229606 Mon Sep 17 00:00:00 2001 From: "justin.schaefer" Date: Wed, 2 Oct 2024 15:59:44 -0500 Subject: [PATCH 3/5] Fixes --- charts/cluster-templates/values-vsphere.yaml | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/charts/cluster-templates/values-vsphere.yaml b/charts/cluster-templates/values-vsphere.yaml index cfea687..f5a0f86 100644 --- a/charts/cluster-templates/values-vsphere.yaml +++ b/charts/cluster-templates/values-vsphere.yaml @@ -1,10 +1,16 @@ cloudCredentialSecretName: "cc-xxxxx" # You can find or create this secret in Cluster Management -> Cloud Credentials cloudprovider: "vsphere" +# Rancher Manager URL +rancher: + cattle: + url: "rancher.example.com" + ### Configure information about the cluster you are creating here cluster: name: "exampleCluster" - kubernetesVersion: "v1.28.13+k3s1" + config: + kubernetesVersion: "v1.28.13+k3s1" ### Configure information about vCenter vcenter: @@ -25,19 +31,19 @@ vcenter: triggerCsiFullsync: enabled: true -# Rancher Manager URL -rancher: - cattle: - url: "rancher.example.com" - # For a complete list of config options, please look here: # https://github.com/rancherfederal/rancher-cluster-templates/blob/customWork/charts/cluster-templates/templates/nodeconfig-vsphere.yaml nodepools: - name: "control-plane" quantity: 1 datacenter: "/Datacenter" - datastore: "/Datacenter/datastore/vsanDatastore" - cloneFrom: "/Datacenter/vm/Rocky9.4-minimal" + # Specify one creationType: vm, template, library, legacy + creationType: "library" + # Your cloneFrom should match the corresponding creationType, etc. + contentLibrary: "MyContentLibrary" + cloneFrom: "Rocky9.4-minimal" + #datastore: "/Datacenter/datastore/vsanDatastore" + #cloneFrom: "/Datacenter/vm/Rocky9.4-minimal" etcd: true controlplane: true worker: true From e52aef25cc19937cafef38496dde7bc2f25a2aa9 Mon Sep 17 00:00:00 2001 From: "justin.schaefer" Date: Thu, 3 Oct 2024 14:42:53 -0500 Subject: [PATCH 4/5] Clean up & comments --- charts/cluster-templates/values-vsphere.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/cluster-templates/values-vsphere.yaml b/charts/cluster-templates/values-vsphere.yaml index f5a0f86..9ce9de4 100644 --- a/charts/cluster-templates/values-vsphere.yaml +++ b/charts/cluster-templates/values-vsphere.yaml @@ -37,13 +37,16 @@ nodepools: - name: "control-plane" quantity: 1 datacenter: "/Datacenter" + datastore: "/Datacenter/datastore/vsanDatastore" # Specify one creationType: vm, template, library, legacy creationType: "library" - # Your cloneFrom should match the corresponding creationType, etc. + # cloneFrom will need to match the corresponding creationType + # For example, if you were cloning from a template, you would use: + # creationType: "template" + # cloneFrom: "/Datacenter/vm/Rocky9.4-minimal" + cloneFrom: "Rocky9.4-minimal" contentLibrary: "MyContentLibrary" cloneFrom: "Rocky9.4-minimal" - #datastore: "/Datacenter/datastore/vsanDatastore" - #cloneFrom: "/Datacenter/vm/Rocky9.4-minimal" etcd: true controlplane: true worker: true From e92c47df3a1d3bb1451c62dc6648ca5d91a5c9c7 Mon Sep 17 00:00:00 2001 From: "justin.schaefer" Date: Fri, 4 Oct 2024 14:09:39 -0500 Subject: [PATCH 5/5] Resolved bug --- charts/cluster-templates/values-vsphere.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/charts/cluster-templates/values-vsphere.yaml b/charts/cluster-templates/values-vsphere.yaml index 9ce9de4..83e137a 100644 --- a/charts/cluster-templates/values-vsphere.yaml +++ b/charts/cluster-templates/values-vsphere.yaml @@ -15,21 +15,6 @@ cluster: ### Configure information about vCenter vcenter: host: "vcenter.lab" - # BUG: Though these have default values defined in cluster.yaml, they will render the following error: - # nil pointer evaluating interface {}.asyncQueryVolume - # You must provide these values for now (10/01/2024) - vsphere: - asyncQueryVolume: - enabled: true - csiController: - csiResizer: - enabled: true - improvedVolumeTopology: - enabled: true - onlineVolumeExtend: - enabled: true - triggerCsiFullsync: - enabled: true # For a complete list of config options, please look here: # https://github.com/rancherfederal/rancher-cluster-templates/blob/customWork/charts/cluster-templates/templates/nodeconfig-vsphere.yaml