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

Adding upgrade settings to all node pool blocks #10376

Merged

Conversation

evenh
Copy link
Contributor

@evenh evenh commented Jan 29, 2021

Adding upgrade settings to all Kubernetes cluster node pool blocks.

make test passes locally and TestAccKubernetesClusterNodePool_upgradeSettings acceptance test passes.

Rebased version of #8123 with some minor fixes. Resolves #7892.

@evenh

This comment has been minimized.

@jmcshane
Copy link
Contributor

Thanks @evenh for doing the rebase here 👍

Co-authored-by: Even Holthe <even.holthe@me.com>
@evenh evenh force-pushed the feature/node-pool-upgrade-settings branch from 3b58b7a to 0ea3e92 Compare February 15, 2021 20:25
@evenh
Copy link
Contributor Author

evenh commented Feb 15, 2021

--- PASS: TestAccKubernetesClusterNodePool_upgradeSettings (1081.24s)

Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @evenh

Thanks for rebasing this PR & apologies for the delayed review @jmcshane

I've taken a look through and whilst on the whole this looks pretty good I've left some comments inline - since I've got a number of other Kubernetes PR's I'm hoping to get in today, so that this doesn't conflict I hope you don't mind but so that we can get this merged I'm going to push a commit to fix the PR comments, then ask @jackofallops to take another look.

Thanks!

@ghost ghost added size/XL and removed size/L labels Feb 16, 2021
@tombuildsstuff tombuildsstuff force-pushed the feature/node-pool-upgrade-settings branch from 3438ed4 to 540d4f3 Compare February 16, 2021 10:56
@tombuildsstuff tombuildsstuff added this to the v2.48.0 milestone Feb 16, 2021
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

THanks @evenh and @tombuildsstuff - Couple comments and questions below, otherwise LGTM 👍

if profile.Type != "" {
agentPoolProfile["type"] = string(profile.Type)
agentType = string(profile.Type)
Copy link
Member

Choose a reason for hiding this comment

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

Since this is a string, not a pointer, we could just reference it directly in the return below?

if profile.VMSize != "" {
agentPoolProfile["vm_size"] = string(profile.VMSize)
vmSize = string(profile.VMSize)
Copy link
Member

Choose a reason for hiding this comment

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

As above.

if profile.OsType != "" {
agentPoolProfile["os_type"] = string(profile.OsType)
osType = string(profile.OsType)
Copy link
Member

Choose a reason for hiding this comment

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

As above.

Check: resource.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("upgrade_settings.#").HasValue("1"),
check.That(data.ResourceName).Key("upgrade_settings.0.max_surge").HasValue("2"),
Copy link
Member

Choose a reason for hiding this comment

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

This should be 4?

Check: resource.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("default_node_pool.0.upgrade_settings.#").HasValue("1"),
check.That(data.ResourceName).Key("default_node_pool.0.upgrade_settings.0.max_surge").HasValue("4"),
Copy link
Member

Choose a reason for hiding this comment

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

Should be 2 here?

@evenh
Copy link
Contributor Author

evenh commented Feb 16, 2021

Thanks for the review @tombuildsstuff and @jackofallops. I've pushed a commit that addresses the latest comments.

@tombuildsstuff
Copy link
Member

Thanks for that @evenh 👍

@tombuildsstuff
Copy link
Member

Tests pass:

Screenshot 2021-02-17 at 12 18 22

@tombuildsstuff tombuildsstuff merged commit dcf96cf into hashicorp:master Feb 17, 2021
tombuildsstuff added a commit that referenced this pull request Feb 17, 2021
tombuildsstuff added a commit that referenced this pull request Feb 17, 2021
@ghost
Copy link

ghost commented Feb 18, 2021

This has been released in version 2.48.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.48.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 19, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Mar 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for max_surge parameter on azurerm_kubernetes_cluster_node_pool
4 participants