-
Notifications
You must be signed in to change notification settings - Fork 198
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 shared VPC networking #991
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bighiro The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @bighiro. Thanks for your PR. I'm waiting for a kubernetes-sigs 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/test-infra repository. |
/ok-to-test |
@bighiro: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
Thanks for this @bighiro 🙇 There are a number of jobs failed. Could you do the following:
This will highlight some issues that will need to be fixed. Additionally you will need to update the conversions manually as the new field
Reach out here or in our slack channel if you need any help. |
Adding comment as I happened to worked on GKE with shared VPC recently. This PR will affect the GKE implementation too as NetworkSpec is common for un-managed and managed GCP clusters. One thing I have seen is that it becomes mandatory to provide secondary Pod and Service ranges for GKE (both auto-pilot and standard) if the cluster is using shared VPC. [1] So we need to verify this PR with GKE too if that is also in focus of this PR. [1] https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-shared-vpc#verify_usable_subnets |
@bighiro - just folllowing up on if you'd be able to review the comments? |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
@@ -93,6 +93,9 @@ type NetworkSpec struct { | |||
// +optional | |||
Name *string `json:"name,omitempty"` | |||
|
|||
// HostProject is the name of the host project hosting the shared VPC network |
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.
// HostProject is the name of the host project hosting the shared VPC network | |
// HostProject is the name of the host project hosting the shared VPC network resources. | |
// +optional |
@@ -94,6 +94,11 @@ func (m *MachineScope) Cloud() cloud.Cloud { | |||
return m.ClusterGetter.Cloud() | |||
} | |||
|
|||
// NetworkCloud returns initialized network cloud |
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.
// NetworkCloud returns initialized network cloud | |
// NetworkCloud returns initialized network cloud. |
|
||
// IsSharedVpc returns the cluster network unique identifier. | ||
func (s *ManagedClusterScope) IsSharedVpc() bool { | ||
if s.NetworkProject() != s.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.
nit:
if s.NetworkProject() != s.Project() { | |
return s.NetworkProject() != s.Project |
@@ -41,6 +41,9 @@ func (s *Service) Reconcile(ctx context.Context) error { | |||
// Delete deletes cluster subnetwork components. | |||
func (s *Service) Delete(ctx context.Context) error { | |||
logger := log.FromContext(ctx) | |||
if s.scope.IsSharedVpc() { | |||
return nil |
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.
Nit: Log/Alert that this is a shared VPC.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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/test-infra repository. |
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
This is an update to the stale PR kubernetes-sigs#991 ** Added support for Host Project for a shared VPC in the Network struct. ** Network Resources will now use the host project name if exists, otherwise the normal project. ** Update the cluster getter interface to include the NetworkProject and Indicator for a shared VPC. ** Update reconcilers for girewall rules, subnets and network. ** Update the services to use the host project for resources when a shared vpc is used.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Support shared VPC networking.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #861 #982
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: