temporalio / temporalio/temporal-worker-controller
[Feature Request] Support Datadog Pod Autoscaler (DPA)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 187
- Forks
- 70
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 31
Description
Is your feature request related to a problem? Please describe.
We are shifting from Watermark Pod Autoscaler to DPA in Datadog and would like to use DPA in a WRT. Sadly, DPA does not follow HPA conventions, namely:
-
DPA uses targetRef instead of scaleTargetRef:
spec: targetRef: apiVersion: apps/v1 kind: Deployment name: <your Deployment name> -
DPA has a different (and complicated) metric setup that does not use matchLabels:
`spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: test
...
objectives:- type: CustomQuery
customQueryObjective:
query:
formulas:
- "query1 / query2"
queries:
-
name: query1
dataSource: metrics
metrics:
query: "avg:system.cpu.user{*}"
-
name: query2
dataSource: apm_metrics
apm_metrics:
stat: "latency_avg"
service: "my-service"
query_filter: "account:prod"`
- type: CustomQuery
If we want to use DPA with the Worker Controller, we'd need a way to template in the temporal_worker_deployment_name, the temporal_worker_build_id and the temporal_namespace for metric filters or queries.
Describe the solution you'd like
DPA can use resource-based targets which would not need the matchLabels setup, so as a first request, I'd like to ask for support for the targetRef field alongside the scaleTargetRef.
In the long term, it would be nice to be able to use queries with the additional fields templated in by the controller.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Worker Controller handling for scaleTargetRef and the existing HPA or Watermark Pod Autoscaler configuration. Add support for targetRef alongside scaleTargetRef, then verify that a Datadog Pod Autoscaler using a resource-based target can be configured; query templating is described as a longer-term request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100