feat: support managed endpoint direct push in config-reloader#22
Merged
Conversation
Add support for managedEndpointUrl and managedBearerToken fields in the PrometheusConfig JSON read from Secret Manager. When both fields are present, the config-reloader renders a remote_write target with Bearer authorization pointing directly at the management plane's telemetry ingest endpoint, bypassing the local RemoteWriteReceiver. Falls back to localRemoteWriteUrl when the managed endpoint fields are absent, preserving backward compatibility. Refactors the allowlist regex construction into a shared helper to avoid duplication between managed and local targets. Co-authored-by: Ona <no-reply@ona.com>
Collaborator
Author
|
The runner-side PR (gitpod-io/gitpod-next#22116) now gates the This PR needs to set that env var on the runner container so the direct-push path activates once the Terraform module is applied. Add it to the --env GITPOD_DEVELOPMENT_VERSION=${DEVELOPMENT_VERSION} \
+ --env MANAGED_METRICS_DIRECT_PUSH=true \
--env no_proxy=${NO_PROXY} \This ensures the rollout order is safe:
|
Add a Python-based metrics audit receiver (port 9095) that accepts
Prometheus remote_write POSTs and writes each payload to GCS using
the same path layout as the existing audit trail:
metrics/runner/{runnerID}/{YYYY}/{MM}/{DD}/{HHmmss}.pb.snappy
When the managed endpoint is configured, the config-reloader now
renders two remote_write targets: one for the management plane
(Bearer auth) and one for the local audit receiver. This ensures
the audit trail captures exactly what is pushed to the management
plane.
Also sets MANAGED_METRICS_DIRECT_PUSH=true in runner.env and the
runner container env, enabling the direct-push code path in the
GCP runner (gitpod-io/gitpod-next#22116).
Co-authored-by: Ona <no-reply@ona.com>
nandajavarma
added a commit
that referenced
this pull request
May 8, 2026
Port the managed metrics pipeline from the runner cloud-init (PR #22) to the proxy cloud-init: - Parse managedEndpointUrl, managedBearerToken, and allowlistPrefixes from the metrics secret - Add managed endpoint remote_write target with Bearer auth - Add metrics audit receiver (Python, port 9095) that writes payloads to GCS for customer audit trails - Build allowlist regex once and reuse via append_allowlist_relabel - Upgrade proxy SA bucket role from objectViewer to objectAdmin for audit writes - Pass RUNNER_ASSETS_BUCKET_NAME to proxy cloud-init template Co-authored-by: Ona <no-reply@ona.com>
easyCZ
pushed a commit
that referenced
this pull request
May 21, 2026
feat: support managed endpoint direct push in config-reloader
easyCZ
pushed a commit
that referenced
this pull request
May 21, 2026
Port the managed metrics pipeline from the runner cloud-init (PR #22) to the proxy cloud-init: - Parse managedEndpointUrl, managedBearerToken, and allowlistPrefixes from the metrics secret - Add managed endpoint remote_write target with Bearer auth - Add metrics audit receiver (Python, port 9095) that writes payloads to GCS for customer audit trails - Build allowlist regex once and reuse via append_allowlist_relabel - Upgrade proxy SA bucket role from objectViewer to objectAdmin for audit writes - Pass RUNNER_ASSETS_BUCKET_NAME to proxy cloud-init template Co-authored-by: Ona <no-reply@ona.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.
What
Updates the runner VM's Prometheus config-reloader (
update-prometheus-config.sh) to support the newmanagedEndpointUrlandmanagedBearerTokenfields in thePrometheusConfigJSON stored in Secret Manager.Why
Part of the telemetry ingest token work (design doc). The GCP runner now mints scoped JWTs and writes them to the
PrometheusConfigsecret. The config-reloader needs to read these fields and render aremote_writetarget with Bearer auth pointing directly at the management plane's/telemetry/metrics/v1endpoint.This bypasses the local
RemoteWriteReceiver→ReportRunnerMetricsRPC path, reducing latency and removing a hop.How
managedEndpointUrlandmanagedBearerTokenfrom the Secret Manager JSONremote_writetarget withauthorization.type: Bearerandauthorization.credentialslocalRemoteWriteUrlwhen managed endpoint fields are absent (backward compatible)append_allowlist_relabelhelper to avoid duplication between managed and local targetsRelated PRs