fix(deploy): scope the titiler Service/Deployment selector by release#65
Merged
Merged
Conversation
The titiler Deployment selector, pod template labels, and Service selector carried only `app.kubernetes.io/name` + `/component`, not the release `/instance` label. So every titiler Service matched every titiler pod across all concurrent releases: a runner's display call to its own `<release>-cng-benchmark-titiler` Service round-robins to ANY release's titiler pod (confirmed: one Service had 6 endpoints, one per release). Harmless when every titiler is identical (same image + sink), but it cross-routes display traffic and breaks per-release isolation. Add the `/instance` label to the Deployment selector.matchLabels, the pod template labels, and the Service selector so each Service routes only to its own release's pod. Co-Authored-By: Claude Opus 4.8 <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.
Problem
The titiler
Deploymentselector, pod template labels, andServiceselector use onlyapp.kubernetes.io/name+/component— not the release/instancelabel. K8s Services route by selector, not name, so although each Service is named<release>-cng-benchmark-titiler, they all share the same selector and therefore match every titiler pod. A runner's display call to its own Service round-robins to an arbitrary release's titiler.Confirmed live (6 concurrent AOI runs): one release's titiler Service had 6 endpoints, one pod per release.
Harmless when every titiler is identical (same image + sink), but it cross-routes the display metric and breaks per-release isolation.
Fix
Add
app.kubernetes.io/instance: {{ .Release.Name }}in three spots intemplates/titiler.yaml: the Deploymentselector.matchLabels, the pod templatelabels, and the Serviceselector. One line each; no behaviour change for a single release.Test
helm templaterenders the Service selector with the instance label; after deploy each<release>-...-titilerService has exactly one endpoint (its own pod).Follow-on to the 0.6.0 display refactor (#62/#64); surfaced by the CNES SW-France AOI runs.