Skip to content

Commit

Permalink
cater for cloud provider region & zone vsphere tag
Browse files Browse the repository at this point in the history
Signed-off-by: Greg May <[email protected]>
  • Loading branch information
MnrGreg committed Jan 4, 2020
1 parent d7f1a21 commit 80a678f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```
Expand Down
3 changes: 3 additions & 0 deletions examples/default/cluster/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions examples/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "*"
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions examples/pre-67u3/controlplane/controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions examples/pre-67u3/machinedeployment/machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 80a678f

Please sign in to comment.