Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Fix support for GCP Shared VPC #4774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix support for GCP Shared VPC #4774

wants to merge 1 commit into from

Conversation

JGiola
Copy link

@JGiola JGiola commented Dec 9, 2019

This Merge Request aim to add support for having the docker-machine operate on a project that is using a shared VPC.

Part of the support is already baked in, like accepting full resource urls for the network and subnetwork parameters of the docker-machine; but is lacking support when checking the presence of the firewall rule to connect to the docker port.
Until now the firewall rule will always searched, created and updated using the project set for the VMs, but this will break if the project is using a shared VPC hosted on another project and so can’t contain firewall rules.

The smaller fix that this merge contains is to extract the project value from the network project link if contains the projects part and fallback to the project variable if not found, and then using this new parameter for all the firewall requests (and to construct the subnetwork link if is not a self link for the same reasons).

If the google-network variable is set to a full link, get the
project from it and use it for all the network related operations.

Signed-off-by: Jacopo Andrea Giola <jacopo@giola.org>
@JGiola JGiola changed the title Add support for GCP Shared VPC Fix support for GCP Shared VPC Dec 9, 2019
rodolfo3 added a commit to rodolfo3/machine that referenced this pull request Aug 28, 2020
rodolfo3 added a commit to rodolfo3/tsuru that referenced this pull request Aug 31, 2020
This includes the latest version (0.16.2) of docker/machine and a bugfix
from shared VPC on Google Cloud: docker/machine#4774

Fixes tsuru#2434
rodolfo3 added a commit to rodolfo3/tsuru that referenced this pull request Aug 31, 2020
This includes the latest version (0.16.2) of docker/machine and a bugfix
from shared VPC on Google Cloud: docker/machine#4774

Fixes tsuru#2434
@DanishKhakwani
Copy link

Can we get this merged?

@mateuszm123111
Copy link

It'd be also very usefull for me, will it be merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants