azurerm_kubernetes_cluster_node_pool: max_surge and max_unavailable should not be required for spot nodes pools#31129
Conversation
… should not be required for spot nodes pools
|
I managed to get the relevants tests running, could someone have a look at this PR please, this is preventing us (and everyone that used the same workaround) from upgrading. |
|
Hello @catriona-m, sorry for tagging you directly but since you were the reviewer of the PR #30563 that introduced the regression I thought this might be in your scope. Well, I'm not sure this should be truly classified as a regression, as it was more of a workaround. Anyway, any help would be greatly appreciated 🙏 For others facing the same issue, you can vote on the PR with a 👍 reaction so it can be prioritised. |
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for fixing this @Kiliandeca - I left a suggestion inline about moving the checks to a CustomizeDiff, but otherwise this is looking good. Thanks!
internal/services/containers/kubernetes_cluster_node_pool_resource.go
Outdated
Show resolved
Hide resolved
internal/services/containers/kubernetes_cluster_node_pool_resource.go
Outdated
Show resolved
Hide resolved
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for fixing this up @Kiliandeca - just left one minor comment, but otherwise I think this is looking good. Thanks!
internal/services/containers/kubernetes_cluster_node_pool_resource.go
Outdated
Show resolved
Hide resolved
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for fixing this up @Kiliandeca - it looks like there are a couple of linting errors that are needing addressed, but this is nearly there I think. Thanks!
|
Sorry about the linter errors, it should be good now. |
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for fixing this up @Kiliandeca - LGTM!

Community Note
Description
For regular nodes at least one of
max_surgeormax_unavailablemust be specified but for Spot nodes theses properties are not supported and if you try to set them you'll get the followings errors:The others
upgrade_settingsproperties are supported for Spot nodes so the provider should support that. Previously I used this workaround #26568 (comment) of settingmax_surgeto an empty string but it no longer works since #30563 broke it.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
I created a new subscription to run the tests I added but couldn't get it to works. I tried multiple region for
ARM_TEST_LOCATIONlikeeastus,westusandwesteuropebut I got the same error about the VM size not available on all of them:This VM size is used in a lot of tests and I didn't want to mess up things unrelated to this PR so can you please guide me on what region I should use to run the tests or tell me if I need to do something special on my subcription. Are all the tests borken for everyone because this VM size is no longer available anywhere?
Update: I could run the tests by changing the VM size of all of them to make sure they works, I will create a proper issue for that as it's the this PR goal to fix that
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_kubernetes_cluster_node_pool: max_surge and max_unavailable should not be required for spot nodes poolsThis is a (please select all that apply):
Related Issue(s)
Fixes #29318
AI Assistance Disclosure
I used an LLM for code suggestion and autocomplete in my IDE
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.