Cost attribution
Overview
Section titled “Overview”FinOps attributes cloud costs to services using the gl_service label, as described in the labeling strategy.
A cost only counts as attributed when its label names an entry in the GitLab Service Catalog.
Set metadata.gl_service in your runway.yml to tell Runway which Service Catalog entry your service belongs to.
Runway then applies it as the gl_service label on your service’s GCP resources, next to the other infrastructure labels from metadata.
Configuration
Section titled “Configuration”apiVersion: runway/v1kind: RunwayServicemetadata: name: example-service department: eng-infra department_group: eng-infra-scalability owner_email_handle: example-team product_category: scalability gl_service: example-servicespec: container_port: 8080gl_service is optional.
It may contain lowercase letters, digits and hyphens, must start and end with a letter or digit, and can be at most 63 characters long.
Without it, Runway uses your Runway service ID.
Choosing the value
Section titled “Choosing the value”Use the name of your service’s entry in the Service Catalog.
Runway does not check that the entry exists.
If your service has no entry yet, add one by following Service Observability (Cloud Run). The same entry is a prerequisite for alerts and capacity planning.
Several Runway services can share one entry. For example, the Cloud Run and Kubernetes deployments of a service, or its separate components, can all use the service’s name.
How Runway applies the label
Section titled “How Runway applies the label”Runway adds gl_service to the labels of the GCP resources it deploys for your service, including:
- the Cloud Run service and its revisions,
- the load balancers’ forwarding rules and IP addresses, and the internal load balancer’s certificate,
- the Cloud Armor security policy,
- the Secret Manager secrets that hold your service’s secrets,
- the mTLS trust configuration and TLS policies, if you use mTLS.
Cloud Run shares revision labels with Cloud Billing, so your service’s compute costs carry the gl_service label and are attributed to its Service Catalog entry.
Jobs set gl_service the same way, under metadata in their runway.yml.
Runway applies it to the Cloud Run job and its executions.
Resources managed by the provisioner
Section titled “Resources managed by the provisioner”Some resources, such as Cloud SQL and Memorystore instances, are managed by the provisioner rather than deployed from your service repository.
They take their labels from the provisioner’s configuration, not from runway.yml.