diff --git a/docs/getting_started.md b/docs/getting_started.md index 716ef1fe57..9984f92c8a 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -81,8 +81,10 @@ export VSPHERE_PASSWORD='some-secure-password' # (required) The password used t export VSPHERE_DATACENTER='SDDC-Datacenter' # (required) The vSphere datacenter to deploy the management cluster on export VSPHERE_DATASTORE='DefaultDatastore' # (required) The vSphere datastore to deploy the management cluster on export VSPHERE_NETWORK='vm-network-1' # (required) The VM network to deploy the management cluster on -export VSPHERE_RESOURCE_POOL='*/Resources' # (required) The vSphere resource pool for your VMs +export VSPHERE_RESOURCE_POOL='*/Resources' # (required) The vSphere resource pool for your VMs export VSPHERE_FOLDER='vm' # (optional) The VM folder for your VMs, defaults to the root vSphere folder if not set. +export VSPHERE_REGION_TAG='k8s-region' # (optional) The vSphere Tag category for vSphere CPI & CSI Regions, defaults to '' if not set. +export VSPHERE_ZONE_TAG='k8s-zone' # (optional) The vSphere Tag category for vSphere CPI & CSI Zones, defaults to '' if not set. export VSPHERE_TEMPLATE='ubuntu-1804-kube-v1.15.4' # (required) The VM template to use for your management cluster. export VSPHERE_DISK_GIB='50' # (optional) The VM Disk size in GB, defaults to 20 if not set export VSPHERE_NUM_CPUS='2' # (optional) The # of CPUs for control plane nodes in your management cluster, defaults to 2 if not set @@ -210,6 +212,9 @@ spec: folder: vm resourcePool: '*/Resources' server: 10.0.0.1 + labels: + region: "k8s-region" + zone: "k8s-zone" server: 10.0.0.1 ``` diff --git a/examples/default/cluster/cluster.yaml b/examples/default/cluster/cluster.yaml index 75c727adb5..1ec1a12773 100644 --- a/examples/default/cluster/cluster.yaml +++ b/examples/default/cluster/cluster.yaml @@ -38,6 +38,9 @@ spec: datastore: "${VSPHERE_DATASTORE}" resourcePool: "${VSPHERE_RESOURCE_POOL}" folder: "${VSPHERE_FOLDER}" + labels: + region: "${VSPHERE_REGION_TAG}" + zone: "${VSPHERE_ZONE_TAG}" providerConfig: cloud: controllerImage: "gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.1.0" diff --git a/examples/generate.sh b/examples/generate.sh index 84217d6985..b4ae6af0f8 100755 --- a/examples/generate.sh +++ b/examples/generate.sh @@ -251,6 +251,8 @@ record_and_export VSPHERE_NETWORK "${ENV_VAR_REQ}" record_and_export VSPHERE_RESOURCE_POOL ':-' record_and_export VSPHERE_FOLDER ':-' record_and_export VSPHERE_TEMPLATE ':-' +record_and_export VSPHERE_REGION_TAG ':-' +record_and_export VSPHERE_ZONE_TAG ':-' record_and_export SSH_AUTHORIZED_KEY ":-''" # single quote string variables that can start with special characters like "*" @@ -301,6 +303,10 @@ scsicontrollertype = pvscsi [Network] public-network = "${VSPHERE_NETWORK}" + +[Labels] +region = "${VSPHERE_REGION_TAG}" +zone = "${VSPHERE_ZONE_TAG}" EOF ) export CLOUD_CONFIG_B64ENCODED diff --git a/examples/pre-67u3/controlplane/controlplane.yaml b/examples/pre-67u3/controlplane/controlplane.yaml index 743f19b14d..4d50b5706d 100644 --- a/examples/pre-67u3/controlplane/controlplane.yaml +++ b/examples/pre-67u3/controlplane/controlplane.yaml @@ -49,6 +49,7 @@ spec: criSocket: "/var/run/containerd/containerd.sock" kubeletExtraArgs: cloud-provider: vsphere + cloud-config: /etc/kubernetes/vsphere.conf clusterConfiguration: imageRepository: ${K8S_IMAGE_REPOSITORY} apiServer: diff --git a/examples/pre-67u3/machinedeployment/machinedeployment.yaml b/examples/pre-67u3/machinedeployment/machinedeployment.yaml index 9116ba0224..648faf26fd 100644 --- a/examples/pre-67u3/machinedeployment/machinedeployment.yaml +++ b/examples/pre-67u3/machinedeployment/machinedeployment.yaml @@ -56,6 +56,7 @@ spec: criSocket: "/var/run/containerd/containerd.sock" kubeletExtraArgs: cloud-provider: vsphere + cloud-config: /etc/kubernetes/vsphere.conf users: - name: capv sudo: "ALL=(ALL) NOPASSWD:ALL"