-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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" and "azurerm_kubernetes_cluster_node_pool" supports "kubelet_config", "linux_os_config" #11119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @njuCZ
Thanks for this PR.
Taking a look through here whilst this is off to a good start, the descriptions for these fields don't make sense (in that they don't really specify what this does clearly) or are missing (e.g. "the sysctl value foo.bar") - would you be able to update these?
Thanks!
azurerm/internal/services/containers/kubernetes_cluster_node_pool_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go
Show resolved
Hide resolved
azurerm/internal/services/containers/kubernetes_cluster_node_pool_resource_test.go
Show resolved
Hide resolved
|
||
* `transparent_huge_page_defrag` - (Optional) Specifies the Transparent Huge Page defrag configuration. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. | ||
|
||
* `transparent_huge_page_enabled` - (Optional) Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this description doesn't make any sense, presumably this toggles if Transparent Huge Pages are enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so should I rename this property, such as "transparent_huge_page_enabled_config" ?
|
||
* `fs_aio_max_nr` - (Optional) The sysctl setting fs.aio-max-nr. Must be between `65536` and `6553500`. Changing this forces a new resource to be created. | ||
|
||
* `fs_file_max` - (Optional) The sysctl setting fs.file-max. Must be between `8192` and `12000500`. Changing this forces a new resource to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to https://www.kernel.org/doc/Documentation/sysctl/fs.txt
@@ -454,6 +494,68 @@ A `ssh_key` block supports the following: | |||
|
|||
--- | |||
|
|||
A `sysctl_config` block supports the following: | |||
|
|||
* `fs_aio_max_nr` - (Optional) The sysctl setting fs.aio-max-nr. Must be between `65536` and `6553500`. Changing this forces a new resource to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
* `transparent_huge_page_defrag` - (Optional) Specifies the Transparent Huge Page defrag configuration. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. | ||
|
||
* `transparent_huge_page_enabled` - (Optional) Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(as below) this description doesn't make sense, should this be "specifies if Transparent Huge Pages are enabled?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so should I rename this property, such as "transparent_huge_page_enabled_config" ?
Hi @tombuildsstuff thanks for your review and suggestions, I have added a partial test for those properties. as for the doc for linuxOSConfig, those properties are used to Tuning linux kernel. Personally I think only professional users should set it, so tell the users which kernel parameter it correspond to is enough and might be more clear. |
Related issue: #10038 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @njuCZ! I took another pass over this PR. It looks mostly good but we should update the documentation to point people to where they can find more information about these attributes.
azurerm/internal/services/containers/kubernetes_cluster_node_pool_resource.go
Outdated
Show resolved
Hide resolved
@mbfrahry thanks for your suggestions! I have refined this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good to go once the conflicts are fixed!
…l" - supports "kubelet_config", "linux_os_config"
@mbfrahry I have rebased the latest code and resolved all conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥
This functionality has been released in v2.64.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
two new blocks in node pool:
kubelet_config
andlinux_os_config
linux_os_config
contains a sub block "sysctl_config", which could set the the kernel parameters, could refer to https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/this two blocks are forcenew fields, if we try to update it, the rest api will report error code:
CustomKubeletConfigOrCustomLinuxOSConfigCanNotBeChanged
.