-
Notifications
You must be signed in to change notification settings - Fork 121
Add --subnet-mode gke-deployer flag
#306
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
Add --subnet-mode gke-deployer flag
#306
Conversation
|
Hi @Qqkyu. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
cc: @BenTheElder @aojea |
|
/ok-to-test |
|
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
1 similar comment
|
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
--subnet-mode gke-deployer flag
| PrivateClusterAccessLevel string `flag:"~private-cluster-access-level" desc:"Private cluster access level, if not empty, must be one of 'no', 'limited' or 'unrestricted'. See the details in https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters."` | ||
| PrivateClusterMasterIPRanges []string `flag:"~private-cluster-master-ip-range" desc:"Private cluster master IP ranges. It should be IPv4 CIDR(s), and its length must be the same as the number of clusters if private cluster is requested."` | ||
| SubnetworkRanges []string `flag:"~subnetwork-ranges" desc:"Subnetwork ranges as required for shared VPC setup as described in https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-shared-vpc#creating_a_network_and_two_subnets. For multi-project profile, it is required and should be in the format of 10.0.4.0/22 10.0.32.0/20 10.4.0.0/14,172.16.4.0/22 172.16.16.0/20 172.16.4.0/22, where the subnetworks configuration for different project are separated by comma, and the ranges of each subnetwork configuration is separated by space."` | ||
| SubnetMode string `flag:"~subnet-mode" desc:"Subnet creation mode of the GKE cluster network (default 'auto' for single-project, and 'custom' for multi-project use cases)."` |
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 seems that the only thing we can choose is to set the default subnet to be auto or custom, and even that . it can only be changed if there is one project ...
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.
Yes, correct. --subnet-mode flag can only effectively change the behavior in a single-project scenario.
Do you think the flag description should make this more clear or do you have any other suggestions?
I can update the flag description to something like: Set the subnet creation mode ('auto' or 'custom'). This flag can only override the default mode for single-project deployments. Multi-project deployments always use 'custom'. What do you think?
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 I was wondering, if this is final and you choose a bool, then is less error prone, you always have a working setup or I think there is only a wrong combination
If you set the enum, then the user will have to figure out the combination of working solutions, taht seems to be multiple
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.
Makes sense, I changed it - ptal
bcf894e to
5065895
Compare
|
@aojea can I get an lgtm here or do you have any other suggestions? |
3c805ed to
87111f1
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Qqkyu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
When migrating tests from kubetest(1) to kubetest2, the
--gke-subnet-mode=customis not migratable for a single-project profile. With this PR we can keep the existing logic when the--subnet-modeis not specified, and allow to overwrite it when needed