Skip to content

Apply Google VM labels also to attached disks

NOTE THAT THIS FORK IS MAINTAINED FOR CRITICAL BUG FIXES AFFECTING RUNNING COSTS ONLY. NO OTHER CONTRIBUTIONS WILL BE ACCEPTED.

What critical bug this MR is fixing?

Technically this doesn't fix a critical bug, but it fixes an inconsistency with regards to how user-specified labels are applied to resources in the Google Cloud. So far, labels were only applied to the VMs created by docker+machine, but not to the disks attached to those VMs. Thus, if one uses labels for cost tracking on the Google Cloud, the disks and the VMs created by docker+machine might not be tracked together. Which likely isn't the intention of the user that provided the labels to docker+machine in the first place.

This change adds the same labels to the Google Cloud disks as are applied to the VMs.

How does this change help reduce cost of usage? What scale of cost reduction is it?

It doesn't reduce the cost of usage but it helps to correctly organize and break down costs of resources on the Google Cloud.

In what scenarios is this change usable with GitLab Runner's docker+machine executor?

When docker+machine is used to provision resources in the Google Cloud and one wants to apply labels to these resources, e.g. for cost tracking.

Merge request reports