Repository navigation
fix(service): serve the Service counters through the stop - #7885
Merged
Merged
Conversation
Owner
Author
|
Fail-to-pass evidence: Local runs on the head: |
dan-petty
marked this pull request as ready for review
November 30, 2026 15:10
dan-petty
enabled auto-merge (squash)
November 30, 2026 16:03
uvicorn closes port 8000 on SIGTERM before the drain, so each count of the drain was lost. The Service now serves GLOBAL_METRICS from a prometheus-client server on port 8001 until the process exits, and waits one scrape interval after the drain. The grace period goes to 720 s. Refs #4876
dan-petty
force-pushed
the
fix/4876-service-metrics-grace
branch
from
November 30, 2026 16:10
b976967 to
a13ad42
Compare
dan-petty
marked this pull request as draft
November 30, 2026 16:11
auto-merge was automatically disabled
November 30, 2026 16:11
Pull request was converted to draft
dan-petty
marked this pull request as ready for review
November 30, 2026 16:20
dan-petty-release Bot
added a commit
that referenced
this pull request
Nov 30, 2026
🤖 I have created a release *beep* *boop* --- ## [0.263.0](v0.262.0...v0.263.0) (2026-11-30) ### Features * **k8s:** check control-plane volumes avoid the k3s root disk ([#7895](#7895)) ([ccf34ac](ccf34ac)), closes [#3985](#3985) ### Bug Fixes * **deps:** update dan-petty/devtools Docker tag to v1.6.0 ([#7897](#7897)) ([9c95596](9c95596)) * **service:** serve the Service counters through the stop ([#7885](#7885)) ([a318e64](a318e64)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
uvicorn closes port 8000 on SIGTERM before the Service drains its rounds, so Prometheus read no count of the drain. The Service now serves GLOBAL_METRICS from a prometheus-client server on port 8001, which stays up until the process exits. After the drain and the return of the Lease, the stop waits 60 s, one scrape interval. The grace period goes from 660 s to 720 s. The Deployment scrapes port 8001, and the NetworkPolicy admits TCP 8001 from monitoring in place of TCP 8000. The homelab egress rule for port 8001 is merged: dan-petty/homelab#422 admits TCP 8001 to the roadmap-service pods, and it is the change that the issue dan-petty/homelab#282 tracked.
Closes #4876
Change:
openspec/changes/archive/2026-11-30-4876-service-metrics-grace/