Open RuriRyan opened 3 years ago
Hi @RuriRyan ,
Would this approach be ok with you?
Thanks! Livius
Ok. Sounds good to me. We'll prioritize this one and try to see what we can achieve via terraform in this regards.
Having some labels/aliases for k8s versions would be a real benefit. I agree with Livius in both points, especially that it should better be implemented in the Cloud API. This way every SDK/Tool would have a benefit, not only terraform. IMHO, regardless where these aliases are introduced, the main challenge is the mapping in terraform for the state file: Every plan/apply has to resolve the alias first and compare to the current state, which has to be a specific version and then leads to a change or no change.
Current Provider Version
latest
Use-cases
When managing multiple k8s clusters via terraform it gets quite tedious when a new k8s version (minor or patch-level) is released.
Proposal
My proposal would be a set of labels which translate to corresponding versions. Like a
latest
label which points to the current default version (https://api.ionos.com/cloudapi/v5/k8s/versions/default). Also some convenience labels which ignore the patch version would be nice, like1.18
which then points to the latest 1.18 version as defined in the versions list (https://api.ionos.com/cloudapi/v5/k8s/versions).This also makes checking for upgrades easier as you can just run
terraform plan
, which then can show if a cluster/nodepool needs to be upgraded.Example
https://api.ionos.com/cloudapi/v5/k8s/versions:
https://api.ionos.com/cloudapi/v5/k8s/versions/default: