Repository navigation
Conversation
…ness Add sentry-options-sync, a native sidecar that watches sentry-options ConfigMaps by name and writes them into shared volumes kubelet-style (timestamped payload, atomic ..data swap). The envoy-injector adds it for pods annotated options.sentry.io/delivery: sidecar, so option changes no longer wait on kubelet's periodic ConfigMap volume sync. Rebuild the Minikube propagation harness around the real injector and production deploy path: the injector runs in-cluster behind TLS with the ops webhook config, the app is an annotated Deployment with no volumes of its own, and each update is generated with sentry-options-cli and applied with kubectl apply --server-side from the host. The harness compares kubelet ConfigMap volumes with the sidecar and checks the app identity's permissions. The Pod annotation refresh mode is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On each live update the sidecar sends sentry.options.sync.generation_to_write, the seconds from the values' generated_at to writing them into the pod, to DogStatsD at SENTRY_OPTIONS_SYNC_STATSD_ADDR. Compared with the client's propagation_delay, this splits deploy-to-pod time from the client's refresh-on-read lag without app or automator changes. The Minikube harness reports the same measurement from the sidecar's log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Summary
Kubelet refreshes ConfigMap volumes only on its periodic pod sync, so option changes take about a minute to reach running pods. This adds
sentry-options-sync, a small native sidecar that watches each options ConfigMap by name and writes it into a sharedemptyDir. It uses the same kubelet layout: a timestamped payload directory, an atomically swapped..datasymlink, and avalues.jsonsymlink through it. The client is unchanged; its mtime-based refresh picks up the new file.options.sentry.io/delivery: sidecar. The companion injector change is getsentry/sentry-envoy-injector#76.sentry-options-sync ready) holds the app container until the first sync. If the sync can't finish within 30s, the sidecar reports ready anyway and the app starts on schema defaults, matching a missing optional ConfigMap.sentry.options.sync.generation_to_writeto DogStatsD (SENTRY_OPTIONS_SYNC_STATSD_ADDR, set by the injector to$(HOST_IP):8128). This is the time fromgenerated_atto the write into the pod. Compared with the client's existingpropagation_delay(generated_atto refresh), it separates deploy-to-pod time from the client's refresh-on-read lag, with no app or automator changes.get/list/watchon the named ConfigMaps. No pod patching and no app-side Kubernetes calls.The Minikube harness is rebuilt to follow
docs/architecture.md:sentry-envoy-injectorruns in-cluster behind TLS, with a webhook mirroring opsenvoy-injector/webhook.yaml.getsentry-webDeployment with no volumes of its own.sentry-options-cli write --output-format configmapand applied withkubectl apply --server-side --force-conflictsfrom the host, likedeploy-new-sentry-options.sh.The old Pod annotation refresh mode from #186 is removed.
Measurement (local Minikube, Kubernetes 1.37)
The sidecar number is dominated by the client's 5s refresh-on-read threshold. A later 5-update sidecar run measured a 4.64s mean end to end, while the sidecar's own
generation_to_writewas 0.14–0.45s, about the same askubectl applyitself. Both runs verified:service-getsentrycan watch only its named ConfigMaps and cannot list ConfigMaps or patch ConfigMaps or Pods.Before production
sentry-options-syncimage. The injector's defaultghcr.io/getsentry/sentry-options-sync:latestis a placeholder.service-getsentryread on the named options ConfigMaps.Checks
cargo test -p sentry-options-sync,cargo clippy -p sentry-options-sync --tests -- -D warningsmake test-minikube-propagation-latencyandmake test-minikube-propagation-latency-sidecar🤖 Generated with Claude Code