This repository has been archived by the owner on Sep 26, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).