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

Containerservices agentpoolprofile maxpods #1753

Merged

Conversation

lfshr
Copy link
Contributor

@lfshr lfshr commented Aug 10, 2018

Added max_pods to agent_pool_profile in azurerm_kubernetes_cluster. This fixes #1729

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 @lfshr

Thanks for this PR :)

I've left a comment inline about the default value - but this otherwise LGTM; if we're able to confirm that and add a test for this (to ensure the max_pods value is set as expected) then this otherwise LGTM 👍

Thanks!

Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Default: 30,
Copy link
Member

Choose a reason for hiding this comment

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

given the discussion in #1729 where it sounds like this limit can change - as such do we need to verify this value in both conditions to be sure (e.g. not attached to a network and attached to a network?) - if it changes it could make more sense to make this field Computed? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course it does... Doh!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed via 8a40400
In my defense, I'm still in holiday mode! 😝

Thanks Tom!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just going to check the fact it's an int isn't going to cause problems. I may need to conditionally supply this to the SDK (if value > 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hold off on this for now. I can't seem to login to the az client this morning. @tombuildsstuff could you possibly try and spin up a cluster with no max_pods specified and tell me if it works? 😕

Copy link
Member

Choose a reason for hiding this comment

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

@lfshr

In my defense, I'm still in holiday mode! 😝
heh no worries, thanks for fixing it - hope you enjoyed it :)

I've spun one up using the existing resource (which sets nothing) - which defaults this to 110 - so I think this should be fine 👍

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.

removing duplicate comment

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 @lfshr

Thanks for pushing those changes - if we can update the acceptance tests to check this functionality then this otherwise LGTM 👍

Thanks!

@@ -691,6 +702,10 @@ func expandAzureRmKubernetesClusterAgentProfiles(d *schema.ResourceData) []conta
OsType: containerservice.OSType(osType),
}

if maxPods := int32(config["max_pods"].(int)); maxPods > 0 {
profile.MaxPods = utils.Int32(maxPods)
}
Copy link
Member

Choose a reason for hiding this comment

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

could we update the acceptance tests (for the internal network probably makes the most sense, rather than a new test?) to set this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@@ -209,6 +209,7 @@ The following arguments are supported:
* `os_disk_size_gb` - (Optional) The Agent Operating System disk size in GB. Changing this forces a new resource to be created.
* `os_type` - (Optional) The Operating System used for the Agents. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. Defaults to `Linux`.
* `vnet_subnet_id` - (Optional) The ID of the Subnet where the Agents in the Pool should be provisioned. Changing this forces a new resource to be created.
* `max_pods` - (Optional) The maximum number of pods that can run on each agent. Default is 30.
Copy link
Member

Choose a reason for hiding this comment

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

This no longer defaults to 30 - so can we remove this?

@lfshr
Copy link
Contributor Author

lfshr commented Aug 14, 2018

@tombuildsstuff That should be everything :)

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 @lfshr

Thanks for pushing the latest changes - this now LGTM 👍 - I'll kick off the tests shortly :)

Thanks!

@tombuildsstuff
Copy link
Member

Tests pass - thanks again for this @lfshr :)

screenshot 2018-08-14 at 13 42 25

@tombuildsstuff tombuildsstuff merged commit d2bcb26 into hashicorp:master Aug 14, 2018
@tombuildsstuff tombuildsstuff deleted the containerservices-agentpoolprofile-maxpods branch August 14, 2018 11:43
tombuildsstuff added a commit that referenced this pull request Aug 14, 2018
@yves-vogl
Copy link
Contributor

Thank you

@ghost
Copy link

ghost commented Mar 5, 2019

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 and limited conversation to collaborators Mar 5, 2019
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.

AKS Agent Pool Profile missing maxPods
3 participants