Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DigitalOcean Example Improvements #272

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

jadamcraig
Copy link

@jadamcraig jadamcraig commented Dec 31, 2020

I have recently had the opportunity (call it too much free time over the holidays) to overhaul the DigitalOcean example (./examples/digitalocean/), and thought some or all of these tweaks might be of interest to the community and the project.

Specifically, the changes include:

  1. Updating the example to use Terraform >= v0.13.x.
  2. Numerous revisions to rke.tf to support the latest rancher/rke.
  3. Updated the versions of DigitalOcean CCM and CSI deployed as addons to the example RKE cluster.
    • digitalocean-cloud-controller-manager upgraded from v0.1.15 to v0.1.30.
    • csi-digitalocean upgraded from v1.0.1 to v2.1.1.
      • It may be helpful to note that I had to modify the DO-provided driver.yaml to support RKE. Specifically, csi-digitalocean, as provided, expects kubelet to use /var/lib/kubelet, whereas RKE uses /opt/rke/var/lib/kubeletvar/lib/kubelet. The specific changes from the DO-provided copy are noted in examples/digitalocean/files/csi-digitalocean-v2.1.1/driver.yaml.
  4. Modified example to use RancherOS, which is now available as a DO-provided/-supported image, in lieu of Ubuntu 18.04 LTS, for a unified Rancher experience!
  5. Cleaned up and consolidated variable definitions to try to make it more intuitive to understand what to change and where to alter how the example RKE cluster is provisioned.
  6. Enabled specification of different droplet sizes for controlplane and worker nodes, respectively.
  7. Introduced dynamic node blocks to rke.tf to simplify adding/removing nodes from the cluster, before or after initial provisioning.
  8. Added support for the cluster_domain kubelet argument, which is also passed to DigitalOcean when droplets are provisioned so that droplet names match the names of the RKE nodes in the cluster when kubectl get nodes is run.
  9. Several additions/updates to the README.md.
  10. Tested and confirmed successful deployments using RKE v1.19.4-rancher1-1 and v1.18.12-rancher1-1.

…/rke instead of hashicorp/rke; also, modified examples/digitalocean/do/versions.tf so we try and pull digitalocean/digitalocean instead of hashicorp/digitalocean
…ates.tf to cleanup interpolation-only expression warnings
…re-gates, since this is no longer required by csi-digitalocean v2.1.1
…et feature-gates, since this is no longer required by csi-digitalocean v2.1.1"

This reverts commit f2c040b.
…re-gates, since this is no longer required by csi-digitalocean v2.1.1
…gates, since declaring this hasn't been allowed since K8s v1.16
kube_config_cluster.yml produced by a successful
build
do/variables.tf to use RancherOS image instead of Ubuntu 18.04 LTS
to update kubelet paths for compatability with RKE.  RKE uses /opt/rke/var/lib/kubelet
instead of /var/lib/kubelet
deployed by Terraform.  Also added section describing how to destroy the
cluster, once created.
the temporary ./terraform-provider-rke-tmp* directory that gets created
during cluster provisioning
directories and rke.tf to:
1. make it easier to discern where to define
variables,
2. improve commenting,
3. enable specifying different droplet sizes for controlplane and worker
nodes,
4. add support for the cluster_domain kubelet argument,
5. make droplet names more meaningful,
6. apply droplet names to nodes in RKE cluster,
7. define RKE node blocks dynamically to make it easier to add and
remove nodes from the cluster by incrementing/decrementing the (new)
node_count variables
@rawmind0
Copy link
Contributor

rawmind0 commented Feb 9, 2021

Issue #270

Copy link
Contributor

@rawmind0 rawmind0 left a comment

Choose a reason for hiding this comment

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

@jadamcraig , thanks for the PR

It LGTM, but before merge, could you please squash the commits??

@jadamcraig
Copy link
Author

@rawmind0 -- Absolutely!

@rawmind0
Copy link
Contributor

rawmind0 commented Jul 6, 2021

@jadamcraig any update here about the changes requested??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants