-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(safer-cluster): add some missing variables #2429
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
base: main
Are you sure you want to change the base?
feat(safer-cluster): add some missing variables #2429
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.
Thanks for the contribution @bergemalm
Can you please build the templates and add to the commit: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/CONTRIBUTING.md#templating
95b1031 to
49f136d
Compare
Done. @apeabody |
|
/gcbrun |
|
Checking in on this one. Any reason for not adding this one on last release? @apeabody |
|
/gemini review |
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.
Code Review
This pull request adds several new variables to the safer-cluster modules, exposing more configuration options for GKE node pools and enabling the Secret Manager addon. The changes are mostly boilerplate and have been applied across multiple generated files. I've identified a few minor issues related to formatting, ordering, and a description that could be improved for consistency and maintainability.
|
/gcbrun |
|
Is there anything waiting on me to release this PR @apeabody ? |
apeabody
left a comment
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.
Thanks for the contribution @bergemalm!
I've checked with the team, and to maintain the "safer-than-default configuration" of the safer-cluster, please drop sysctls and the 1g hugepage. Otherwise this looks, good. Thanks!
- node_pools_resource_manager_tags - node_pools_cgroup_mode - node_pools_hugepage_size_2m - enable_secret_manager_addon
490beed to
a5ce97e
Compare
|
I removed |
|
/gcbrun |
|
/gemini review |
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.
Code Review
This pull request adds several new variables to the safer-cluster modules. While the changes are mostly straightforward, there are a few areas that need attention. Some variables mentioned in the metadata files (node_pools_hugepage_size_1g, node_pools_linux_node_configs_sysctls) appear to be incompletely implemented as they are missing from the Terraform variable definitions and module calls. Additionally, there are some formatting inconsistencies, such as unaligned code in .tf files and unsorted lists in documentation and metadata, which should be addressed to improve maintainability. I've also noticed some misleading comments in variable definitions and an unrelated change for monitoring_auto_monitoring_config_scope that would be better in a separate PR. My detailed comments below provide specific suggestions for these points.
| node_pools_cgroup_mode: | ||
| name: node_pools_cgroup_mode | ||
| title: Node Pools Cgroup Mode | ||
| node_pools_hugepage_size_1g: | ||
| name: node_pools_hugepage_size_1g | ||
| title: Node Pools Hugepage Size 1G | ||
| node_pools_hugepage_size_2m: | ||
| name: node_pools_hugepage_size_2m | ||
| title: Node Pools Hugepage Size 2M | ||
| node_pools_labels: | ||
| name: node_pools_labels | ||
| title: Node Pools Labels | ||
| node_pools_linux_node_configs_sysctls: | ||
| name: node_pools_linux_node_configs_sysctls | ||
| title: Node Pools Linux Node Configs Sysctls |
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.
There are a couple of issues here:
- The variables
node_pools_hugepage_size_1gandnode_pools_linux_node_configs_sysctlsare added to this metadata file, but they don't seem to be defined invariables.tfor used inmain.tf. This looks like an incomplete implementation. Please either implement them fully or remove them for now. - The variables in this section are not sorted alphabetically. Please sort them to improve readability and maintainability.
| node_pools_cgroup_mode: | ||
| name: node_pools_cgroup_mode | ||
| title: Node Pools Cgroup Mode | ||
| node_pools_hugepage_size_1g: | ||
| name: node_pools_hugepage_size_1g | ||
| title: Node Pools Hugepage Size 1G | ||
| node_pools_hugepage_size_2m: | ||
| name: node_pools_hugepage_size_2m | ||
| title: Node Pools Hugepage Size 2M | ||
| node_pools_labels: | ||
| name: node_pools_labels | ||
| title: Node Pools Labels | ||
| node_pools_linux_node_configs_sysctls: | ||
| name: node_pools_linux_node_configs_sysctls | ||
| title: Node Pools Linux Node Configs Sysctls |
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.
There are a couple of issues here:
- The variables
node_pools_hugepage_size_1gandnode_pools_linux_node_configs_sysctlsare added to this metadata file, but they don't seem to be defined invariables.tfor used inmain.tf. This looks like an incomplete implementation. Please either implement them fully or remove them for now. - The variables in this section are not sorted alphabetically. Please sort them to improve readability and maintainability.
| type = map(string) | ||
| description = "Map of strings containing cgroup node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
| type = map(string) | ||
| description = "Map of strings containing hugepage size 2m node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
| monitoring_auto_monitoring_config_scope: | ||
| name: monitoring_auto_monitoring_config_scope | ||
| title: Monitoring Auto Monitoring Config Scope |
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.
| type = map(string) | ||
| description = "Map of strings containing cgroup node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
| type = map(string) | ||
| description = "Map of strings containing hugepage size 2m node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
| type = map(string) | ||
| description = "Map of strings containing cgroup node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
| type = map(string) | ||
| description = "Map of strings containing hugepage size 2m node config by node-pool name" | ||
|
|
||
| # Default is being set in variables_defaults.tf |
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.
Thanks @bergemalm - Yes, if you need |
This PR adds some missing variables in the safer-cluster modules.
Closes #2369