feat: Add private endpoint subnetwork variable for safer cluster modules#2540
Conversation
Summary of ChangesHello @christiangonre, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the GKE safer-cluster modules by adding a new configuration option that allows users to explicitly define a subnetwork for the private endpoint. This provides more flexibility in network design and resource management, as it avoids the automatic creation of a new subnet and instead enables the use of an existing one. The change is designed to be backward-compatible, maintaining stability for current implementations. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a private_endpoint_subnetwork variable to the safer-cluster module, allowing users to specify an existing subnetwork for the GKE cluster's private endpoint. This is a valuable addition for more flexible network configurations. I've found one potential issue where using the new variable could cause Terraform errors due to conflicting arguments. My review includes a comment with a suggested fix for this.
155491d to
8e23a0f
Compare
8e23a0f to
972a198
Compare
|
/gemini review |
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request introduces the private_endpoint_subnetwork variable to the safer-cluster modules, allowing users to specify an existing subnetwork for the GKE master's private endpoint. This is a valuable addition that avoids the automatic creation of a new subnet. The implementation is sound and consistently applied across the autogen templates and the generated modules. I've suggested some minor documentation improvements to clarify the relationship between the new variable and master_ipv4_cidr_block for better user experience.
|
/gcbrun |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds the private_endpoint_subnetwork variable to the safer-cluster and safer-cluster-update-variant modules, allowing users to specify an existing subnetwork for the GKE private endpoint. The implementation correctly nullifies master_ipv4_cidr_block when private_endpoint_subnetwork is used, respecting their mutual exclusivity. All relevant files, including autogen templates, module code, documentation, and metadata, have been updated consistently. The change is non-breaking as the new variable defaults to null.
|
/gcbrun |
apeabody
left a comment
There was a problem hiding this comment.
Thanks for the contribution @christiangonre
This PR adds the option to define a
private_endpoint_subnetworkvalue for the safer-cluster modules.After this PR, every time you want to create a new GKE cluster it creates a new subnet in the same VPC of the GKE cluster. This PR adds the option to deploy the endpoint without creating a new subnet.
No breaking changes because the default value of the var is null, same value that we are using currently in the
private_clustermodule