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

kubernetes - add support for surge upgrades #465

Merged

Conversation

varshavaradarajan
Copy link
Contributor

Introduce the cluster config option surge_upgrade for users. This will allow the users to choose if they want new worker nodes to be created before destroying the outdated nodes during an upgrade.

@varshavaradarajan varshavaradarajan force-pushed the surge-upgrade-support branch 2 times, most recently from 10ca1ba to 20b5ea2 Compare July 20, 2020 21:15
@varshavaradarajan
Copy link
Contributor Author

cc @adamwg, @waynr, @andrewsomething

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

The change itself looks great, but there are a few more bits that are needed.

The website CI failure is a side effect of the recent repo move. Merging/rebasing on master should resolve it: #468

Though running the acceptance tests, I am also seeing failures. e.g.

    testing.go:640: Step 0 error: Check failed: 1 error occurred:
        	* Check 4/35 error: digitalocean_kubernetes_cluster.foobar: Attribute 'surge_upgrade' expected "true", got "false"

In addition to checking that the value is set, you also need to add surge_upgrade = true to the configs the tests uses.

resource "digitalocean_kubernetes_cluster" "foobar" {

resource "digitalocean_kubernetes_cluster" "foobar" {

You can run specific acceptance tests using:

make testacc TESTARGS='-run=TestAccDigitalOceanKubernetesCluster_Basic'

Note these do spin up real resources.

We probably also want to set this in the data source:
https://github.com/digitalocean/terraform-provider-digitalocean/blob/master/digitalocean/datasource_digitalocean_kubernetes_cluster.go

And mention it in the docs as well:

https://github.com/digitalocean/terraform-provider-digitalocean/blob/master/website/docs/r/kubernetes_cluster.html.markdown

@varshavaradarajan
Copy link
Contributor Author

@andrewsomething - thank you for reviewing this. I have addressed your comments. Do you mind taking another look when free?

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

👍 Looks good, thanks!

@andrewsomething andrewsomething merged commit 1f18243 into digitalocean:master Jul 21, 2020
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.

2 participants