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

azurerm_kubernetes_cluster: Cycle node-pool if node_pool has node level relevant changes #21719

Merged
merged 19 commits into from
May 31, 2023

Conversation

jkroepke
Copy link
Contributor

@jkroepke jkroepke commented May 9, 2023

Follow up from #20628

At the moment, only vm_size is support for the builtin cycle of node pool. I would also like to go this way, if os_disk_type has been changed from Managed to Ephemeral and back.

the os_disk_type, os_sku, os_disk_size_gb property of the default_node_pool is no longer ForceNew and can be resized by specifying temporary_name_for_rotation

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @jkroepke.

Aside from the comments left in-line we would also need to add a test for these. Once that's done we can take another look through this!

website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
@jkroepke
Copy link
Contributor Author

I hope, everything fits now.

@jkroepke
Copy link
Contributor Author

jkroepke commented May 14, 2023

@stephybun

% make acctests SERVICE='containers' TESTARGS='-run=TestAccKubernetesCluster_cycleSystemNodePool' TESTTIMEOUT='60m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/containers -run=TestAccKubernetesCluster_cycleSystemNodePool -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccKubernetesCluster_cycleSystemNodePool
=== PAUSE TestAccKubernetesCluster_cycleSystemNodePool
=== CONT  TestAccKubernetesCluster_cycleSystemNodePool

--- PASS: TestAccKubernetesCluster_cycleSystemNodePool (2579.70s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/containers    2582.301s

Looks fine on my site now. Mention that I add more properties here, since. See also #21762 which also request zones

@jkroepke jkroepke force-pushed the aks/inplace-upgrade-of-os branch from 7cc1679 to 0453b54 Compare May 28, 2023 12:23
@jkroepke
Copy link
Contributor Author

Rebased

@jkroepke
Copy link
Contributor Author

% make acctests SERVICE='containers' TESTARGS='-run=TestAccKubernetesCluster_cycleSystemNodePool' TESTTIMEOUT='60m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/containers -run=TestAccKubernetesCluster_cycleSystemNodePool -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccKubernetesCluster_cycleSystemNodePool
=== PAUSE TestAccKubernetesCluster_cycleSystemNodePool
=== CONT  TestAccKubernetesCluster_cycleSystemNodePool
--- PASS: TestAccKubernetesCluster_cycleSystemNodePool (2756.32s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/containers    2759.008s

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for extending this to additional properties @jkroepke. I left some comments in-line which need to be addresed - once those are resolved I will run the tests.

internal/services/containers/kubernetes_nodepool.go Outdated Show resolved Hide resolved
internal/services/containers/kubernetes_nodepool.go Outdated Show resolved Hide resolved
internal/services/containers/kubernetes_nodepool.go Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
website/docs/r/kubernetes_cluster.html.markdown Outdated Show resolved Hide resolved
jkroepke added 2 commits May 30, 2023 09:40
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
@jkroepke
Copy link
Contributor Author

@stephybun Issues are resolved.

@jkroepke jkroepke requested a review from stephybun May 30, 2023 07:45
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for your effort on this @jkroepke. Hope you don't mind I pushed a minor update to the docs adding the Note from the review to the default_node_pool block.

The tests also look good so this is good to go! LGTM 🌵

@jkroepke
Copy link
Contributor Author

Hope you don't mind I pushed a minor update to the docs adding the Note from the review to the default_node_pool block.

You are welcome. One less review cycle :)

@stephybun stephybun merged commit 727c3c4 into hashicorp:main May 31, 2023
@github-actions github-actions bot added this to the v3.59.0 milestone May 31, 2023
stephybun added a commit that referenced this pull request May 31, 2023
@jkroepke jkroepke deleted the aks/inplace-upgrade-of-os branch May 31, 2023 06:08
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
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 changing AKS default node pool params without recreating the cluster
2 participants