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
Add digitalocean_kubernetes_cluster.auto_upgrade #237
Comments
I'm interested in adding this feature but wanted to clarify some of my assumptions and hopefully get some feedback on it. Currently, the resource requires a version of the Kubernetes cluster one wishes to provision. Once the new |
I haven't thought about that. Enabling |
Hey @lfarnell! Sorry for the delayed review on the PR. I've been mulling this one over for a bit. The Thinking aloud bit.. If we wanted to avoid deprecating
https://www.terraform.io/docs/extend/resources.html#customizing-differences Auto upgrades only work for patch versions, so there could be another case in there. This would get more complicated when adding support for triggering a patch update manually... 🤔 |
Hi. Does autoupgrade works at the moment? |
I am also in doubt, what approach do we need to take to upgrade a cluster that was created with terraform. What would happen to the terraform state if I upgrade the cluster using the GUI/API/DOCTL? Also what happens if we enable auto upgrade in the gui. :/ Any advise on how to proceed with this? |
Also interested about this issue. Thx. |
hi! What is the current way to enable |
Any progress on this issue? Eagerly waiting for it to exist. |
Just letting everyone know that this hasn't been solved at this point. Something I've just tested is you can apply a
This is a 100% "hack" to allow individuals to upgrade the cluster version without the Terraform state showing a diff on each plan/apply. I would use this sparingly. If I can find some time in the next few weeks, I will try and send another PR for the addition of |
Ok, I think I may have figured this whole debacle out but I would like it if someone can verify my findings. So normally we would declare a definition like resource "digitalocean_kubernetes_cluster" "foo" {
name = "foo"
region = "nyc1"
version = "1.12.1-do.2"
node_pool {
name = "worker-pool"
size = "s-2vcpu-2gb"
node_count = 3
}
} Now If I use code patch I have locally for enabling auto upgrades and our new maintenance policy(below is the prototype definition), we would have something like resource "digitalocean_kubernetes_cluster" "foo" {
name = "foo"
region = "nyc1"
version = "1.12.1-do.2"
auto_upgrade = true
node_pool {
name = "worker-pool"
size = "s-2vcpu-2gb"
node_count = 3
}
#This is a prototype
maintenance_policy {
start_time = "..."
day = "Sunday"
}
} The problem we would now face is that when we enter the maintenance mode and the cluster is potentially upgraded to the newest patch version, our terraform state would diverge. But we if use a data source like such data "digitalocean_kubernetes_versions" "example" {
version_prefix = "1.18."
} we no longer have this problem. Even we doing a major version upgrade to 1.19 once it's available, changing the version to 1.19 in the data source will trigger a cluster upgrade automatically once applied. |
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Have the option to enable auto upgrade, and even as the updates are patches of the same version of Kubernetes have it default to true.
Actual Behavior
The cluster gets created without auto upgrade enabled.
References
The text was updated successfully, but these errors were encountered: