Skip to content

[main] feat(ci): label bosh-lite GCP resources for tracking#3830

Open
prkalle wants to merge 1 commit into
cloudfoundry:mainfrom
prkalle:add/resource_labels
Open

[main] feat(ci): label bosh-lite GCP resources for tracking#3830
prkalle wants to merge 1 commit into
cloudfoundry:mainfrom
prkalle:add/resource_labels

Conversation

@prkalle

@prkalle prkalle commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description of the Change

This PR adds belongs-to=cli / environment=<env> labels to the CF infra resources CI provisions on GCP for tracking

Why Is This PR Valuable?

This PR helps to track the resource usage of cli.

Applicable Issues

How Urgent Is The Change?

Fairly urgent as there is ask to add the labels to infra resources by end of this month.

Other Relevant Parties

Who else is affected by the change?

Add belongs-to=cli / environment=<env> labels to the CF infra
resources CI provisions on GCP for tracking
- director VM: labels set via the google CPI (bosh-lite-vm-type.yml),
  with env_name threaded through create-director-override.sh
- director boot/persistent disks and the static external IP: labeled
  with gcloud in create-bosh-lite.yml (the CPI has no disk-label
  property, and the IP is created by bbl's terraform)

Labeling is best-effort so a labeling hiccup never tears down a good
env. VPC networks, subnets and firewall rules are intentionally not
labeled -- GCP does not support labels on those resource types.

Signed-off-by: Prem Kumar Kalle <prem.kalle@broadcom.com>
@prkalle

prkalle commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Successful run : https://github.com/cloudfoundry/cli/actions/runs/29858136746/job/88727600552

And verified the lables are added:

❯ gcloud compute instances list --filter="labels.environment=cli-sian" \
  --format="table(name, zone.basename(), labels.list())"
NAME                                     ZONE        LABELS
vm-343bf182-5f6f-49f8-4896-3e6b9de15ee4  us-east1-b  belongs-to=cli,deployment=bosh,director=bosh-init,environment=cli-sian,index=0,instance-group=bosh,job=bosh,name=bosh-0


Updates are available for some Google Cloud CLI components.  To install them,
please run:
  $ gcloud components update

❯ gcloud compute disks list --filter="labels.environment=cli-sian" \
  --format="table(name, zone.basename(), labels.list())"
NAME                                       ZONE        LABELS
disk-1a79a5a7-6388-4029-4a8b-95845851aee1  us-east1-b  belongs-to=cli,environment=cli-sian
vm-343bf182-5f6f-49f8-4896-3e6b9de15ee4    us-east1-b  belongs-to=cli,environment=cli-sian
❯ gcloud compute addresses list --regions=us-east1 --filter="labels.environment=cli-sian" \
  --format="table(name, labels.list())"
NAME                       LABELS
cli-sian-bosh-director-ip  belongs-to=cli,environment=cli-sian,goog-terraform-provisioned=true
cli-sian-jumpbox-ip        belongs-to=cli,environment=cli-sian,goog-terraform-provisioned=true
❯ gcloud compute addresses describe cli-sian-bosh-director-ip --region=us-east1 \
  --format="yaml(name, labels)"
labels:
  belongs-to: cli
  environment: cli-sian
  goog-terraform-provisioned: 'true'
name: cli-sian-bosh-director-ip

@anujc25 anujc25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants