feat(wrt): strip temporal_ prefix from HPA metric matchLabels when en… - #611
Open
pranavthakur0-0 wants to merge 1 commit into
Open
pranavthakur0-0 wants to merge 1 commit into
pranavthakur0-0 wants to merge 1 commit into
Conversation
…abled Add default-off CLI/Helm flag so self-hosted metrics can use worker_deployment_name, worker_build_id, and namespace; extend webhook validation when stripping is on.
pranavthakur0-0
requested review from
a team,
eniko-dif and
jlegrone
as code owners
September 19, 2026 21:42
|
|
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.
Fixes #588
What was changed
--wrt-hpa-match-labels-strip-temporal-prefixand envWRT_HPA_MATCH_LABELS_STRIP_TEMPORAL_PREFIX.workerResourceTemplate.hpaMatchLabelsStripTemporalPrefix(schema + manager Deployment env).matchLabelsuseworker_deployment_name,worker_build_id, andnamespaceinstead oftemporal_worker_deployment_name,temporal_worker_build_id, andtemporal_namespace.temporal_*).docs/worker-resource-templates.md.--set true.Why?
Self-hosted Temporal Server OpenMetrics use native label names (
worker_deployment_name, etc.). Temporal Cloud metrics use thetemporal_*prefix. Today the controller always injectstemporal_*, which breaks HPA external metrics against self-hosted backends unless operators rename labels out of band. This implements the maintainer plan for #588: optional prefix stripping on the three hardcoded injected keys only, without changing KEDA triggers, pod selectors, or metric values.Testing
go test ./api/v1alpha1 ./internal/k8s ./internal/planner ./internal/controllerhelm templateassertsWRT_HPA_MATCH_LABELS_STRIP_TEMPORAL_PREFIXdefaults tofalseand renderstruewhen the value is enabled