Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Deploy clusters on multiple-azs in vSphere. #1108

Merged

Conversation

saji-pivotal
Copy link
Contributor

@saji-pivotal saji-pivotal commented Nov 9, 2021

Deploy clusters on multiple-azs in vSphere.
Signed-off-by: Sudarshan asudarshan@vmware.com

What this PR does / why we need it

This PR is to support deploying workload cluster on vSphere across multiple AZs. The AZs are custom defined in vSphere by using VsphereFailureDomains and VsphereDeploymentZone resources. The name of the VsphereDeploymentZone is referenced in the failureDomain field of the vSphere templates.

Which issue(s) this PR fixes

Fixes #827

Describe testing done for PR

Testing deployment of workers across different hosts within a single compute cluster

  1. On a vsphere environment, tagged the compute cluster with the k8s-region label, and the hosts with k8s-zone labels. Set up association rules
  2. Created a management cluster successfully
  3. Created VsphereFailureDomains, and VsphereDeploymentZones on the management cluster
  4. Set the environment variables VSPHERE_AZ_0, VSPHERE_AZ_1, VSPHERE_AZ_2
  5. Set the environment variables VSPHERE_REGION to k8s-region and VSPHERE_ZONE to k8s-zone which are the required tagCategories
  6. Ran tanzu cluster create... and verified that the machines were deployed in the desired failureDomain (in this case, the desired hosts)
  7. Scaled up the cluster from 3-5 workers, and scaled it back down

Testing deployment of workers across different compute clusters in a single datacenter

  1. On a vsphere environment, tagged the datacenter with the k8s-region label, and the compute clusters with k8s-zone labels. Set up association rules
  2. Created a management cluster successfully
  3. Created VsphereFailureDomains, and VsphereDeploymentZones on the management cluster
  4. Set the environment variables VSPHERE_AZ_0, VSPHERE_AZ_1, VSPHERE_AZ_2
  5. Set the environment variables VSPHERE_REGION to k8s-region and VSPHERE_ZONE to k8s-zone which are the required tagCategories
  6. Ran tanzu cluster create... and verified that the machines were deployed in the desired failureDomains (in this case, the desired compute clusters)
  7. Scaled up the cluster from 3-5 workers, and scaled it back down
  8. Added a node-pool to the cluster specifying the desired az, and verified that it got deployed on the desired failureDomain

Release note

Supports deployment of workload clusters across multiple azs on vsphere
Introduces multiple machine deployments (md-1, md-2) for production clusters - This aligns with the machine deployment strategy used for AWS and Azure.

PR Checklist

  • Squash the commits into one or a small number of logical commits
  • Use good commit messages
  • Ensure PR contains terms all contributors can understand and links all contributors can access

Additional information

Special notes for your reviewer

@saji-pivotal saji-pivotal requested a review from a team as a code owner November 9, 2021 14:50
@saji-pivotal saji-pivotal force-pushed the saji/deploy-vsphere-azs branch 2 times, most recently from 2eb0ff3 to 988a169 Compare November 9, 2021 22:04
@saji-pivotal saji-pivotal changed the title WIP: Deploy clusters on multiple-azs in vSphere. Deploy clusters on multiple-azs in vSphere. Nov 9, 2021
@saji-pivotal saji-pivotal force-pushed the saji/deploy-vsphere-azs branch 2 times, most recently from ec8312b to 1b41090 Compare November 9, 2021 23:34
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1108/20211110000755/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

Copy link
Contributor

@tenczar tenczar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

… no regressions

Signed-off-by: Sudarshan <asudarshan@vmware.com>
Copy link
Contributor

@prkalle prkalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@saji-pivotal saji-pivotal added the area/ux UX related label Nov 10, 2021
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1108/20211110004207/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@danniel1205 danniel1205 added the ok-to-merge PRs should be labelled with this before merging label Nov 10, 2021
Copy link
Contributor

@danniel1205 danniel1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ux UX related cla-not-required ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi-az on vSphere: Deploy workload cluster on multiple AZs in vSphere
5 participants