Skip to content

feat(k8s): add service_name label to k8s macro resources#255

Open
fpacifici wants to merge 1 commit intomainfrom
fpacifici/service_name
Open

feat(k8s): add service_name label to k8s macro resources#255
fpacifici wants to merge 1 commit intomainfrom
fpacifici/service_name

Conversation

@fpacifici
Copy link
Collaborator

Summary

  • Add service label (set to make_k8s_name(service_name)) to the labels dict in pipeline_step.py
  • This propagates the service label to Deployment metadata, spec.selector.matchLabels, pod template labels, and ConfigMap metadata
  • Add test assertions for the new service label in affected test cases

Test plan

  • test_run_generates_complete_manifests — asserts service label on deployment metadata, selector matchLabels, and configmap metadata
  • test_run_emergency_patch_overrides — asserts service label on deployment metadata
  • test_user_template_merged_with_base_template — asserts service key present in deployment labels
  • All 20 tests in tests/test_pipeline_step.py pass

🤖 Generated with Claude Code

Add `service` label to the labels dict in `pipeline_step.py` so that
Deployment and ConfigMap resources include the service name, enabling
service-level monitoring, alerting, and discovery in Sentry's infrastructure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fpacifici fpacifici requested a review from a team as a code owner March 13, 2026 00:36
@github-actions
Copy link

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (k8s) Add service_name label to k8s macro resources by fpacifici in #255

Internal Changes 🔧

Deps

  • Bump virtualenv from 20.31.2 to 20.36.1 in /sentry_streams by dependabot in #248
  • Bump bytes from 1.10.1 to 1.11.1 in /sentry_streams by dependabot in #242
  • Bump urllib3 from 2.5.0 to 2.6.3 in /sentry_streams by dependabot in #239
  • Bump protobuf from 5.29.5 to 5.29.6 in /sentry_streams by dependabot in #244

🤖 This preview updates automatically when you update the PR.

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.

1 participant