-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fixes to subnets creation for GKE multiproject profile. #132
Conversation
chizhg
commented
May 10, 2021
- subnet create command does not support --zone(https://cloud.google.com/sdk/gcloud/reference/compute/networks/subnets/create) but cluster create command supports, this PR converts zone to region when creating subnets if zonal clusters are requested.
- Move createSubnets and deleteSubnets to separate functions.
FYI @joshua-bone |
/assign @amwat |
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.
/approve
minor comments before lgtm
kubetest2-gke/deployer/deployer.go
Outdated
@@ -201,14 +202,24 @@ func (d *deployer) verifyLocationFlags() error { | |||
return nil | |||
} | |||
|
|||
// location returns the location flags for gcloud commands. | |||
func location(region, zone string) string { | |||
// locationFlag returns the location flag for gcloud commands. |
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.
// locationFlag returns the location flag for gcloud commands. | |
// locationFlag builds the zone/region flag from the provided zone/region | |
// prioritizes zones if both are specified | |
// used by gcloud commands. |
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.
We actually do not allow --region
and --zone
to be both set in the verifyLocationFlags
function, so I added the comment as:
// locationFlag builds the zone/region flag from the provided zone/region
// used by gcloud commands.
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.
We actually do not allow --region and --zone to be both set in the verifyLocationFlags function
ACK, mainly the "prioritizes" comment was to highlight what gets chosen if both are specified in context of just this function.
1. subnet create command does not support --zone(https://cloud.google.com/sdk/gcloud/reference/compute/networks/subnets/create) but cluster create command supports, this PR converts zone to region when creating subnets if zonal clusters are requested. 2. Move createSubnets and deleteSubnets to separate functions.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amwat, chizhg 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 |