Skip to content

Commit 394df7b

Browse files
authored
Merge pull request #214 from togethercomputer/dulaj/deployments-autoscaling-configs
fix: fixed autoscaling configs in deployments api
2 parents be86c83 + 4c94683 commit 394df7b

1 file changed

Lines changed: 78 additions & 17 deletions

File tree

openapi.yaml

Lines changed: 78 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12363,12 +12363,13 @@ components:
1236312363
type: string
1236412364
type: array
1236512365
autoscaling:
12366-
additionalProperties:
12367-
type: string
12368-
description: 'Autoscaling configuration as key-value pairs. Example: {"metric":
12369-
"QueueBacklogPerWorker", "target": "10"} to scale based on queue
12370-
backlog'
12371-
type: object
12366+
description: 'Autoscaling configuration. Example: {"metric": "QueueBacklogPerWorker",
12367+
"target": 1.01} to scale based on queue backlog. Omit or set to null to
12368+
disable autoscaling'
12369+
oneOf:
12370+
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
12371+
- $ref: '#/components/schemas/QueueAutoscalingConfig'
12372+
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
1237212373
command:
1237312374
description: Command overrides the container's ENTRYPOINT. Provide as an array
1237412375
(e.g., ["/bin/sh", "-c"])
@@ -12523,11 +12524,12 @@ components:
1252312524
type: string
1252412525
type: array
1252512526
autoscaling:
12526-
additionalProperties:
12527-
type: string
12528-
description: Autoscaling contains autoscaling configuration parameters for this
12529-
deployment
12530-
type: object
12527+
description: Autoscaling contains autoscaling configuration parameters for
12528+
this deployment. Omitted when autoscaling is disabled (nil)
12529+
oneOf:
12530+
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
12531+
- $ref: '#/components/schemas/QueueAutoscalingConfig'
12532+
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
1253112533
command:
1253212534
description: Command is the entrypoint command run in the container
1253312535
items:
@@ -12662,6 +12664,65 @@ components:
1266212664
required:
1266312665
- name
1266412666
type: object
12667+
HTTPAutoscalingConfig:
12668+
description: Autoscaling config for HTTPTotalRequests and HTTPAvgRequestDuration
12669+
metrics
12670+
properties:
12671+
metric:
12672+
description: Metric must be HTTPTotalRequests or HTTPAvgRequestDuration
12673+
enum:
12674+
- HTTPTotalRequests
12675+
- HTTPAvgRequestDuration
12676+
example: HTTPTotalRequests
12677+
type: string
12678+
target:
12679+
description: 'Target is the threshold value. Default: 100 for HTTPTotalRequests,
12680+
500 (ms) for HTTPAvgRequestDuration'
12681+
example: 100
12682+
type: number
12683+
time_interval_minutes:
12684+
description: 'TimeIntervalMinutes is the rate window in minutes. Default:
12685+
10'
12686+
example: 10
12687+
type: integer
12688+
type: object
12689+
QueueAutoscalingConfig:
12690+
description: Autoscaling config for QueueBacklogPerWorker metric
12691+
properties:
12692+
metric:
12693+
description: Metric must be QueueBacklogPerWorker
12694+
enum:
12695+
- QueueBacklogPerWorker
12696+
example: QueueBacklogPerWorker
12697+
type: string
12698+
model:
12699+
description: Model overrides the model name for queue status lookup. Defaults
12700+
to the deployment app name
12701+
type: string
12702+
target:
12703+
description: 'Target is the threshold value. Default: 1.01'
12704+
example: 1.01
12705+
type: number
12706+
type: object
12707+
CustomMetricAutoscalingConfig:
12708+
description: Autoscaling config for CustomMetric metric
12709+
properties:
12710+
custom_metric_name:
12711+
description: CustomMetricName is the Prometheus metric name. Required. Must
12712+
match [a-zA-Z_:][a-zA-Z0-9_:]*
12713+
example: my_custom_metric
12714+
type: string
12715+
metric:
12716+
description: Metric must be CustomMetric
12717+
enum:
12718+
- CustomMetric
12719+
example: CustomMetric
12720+
type: string
12721+
target:
12722+
description: 'Target is the threshold value. Default: 500'
12723+
example: 500
12724+
type: number
12725+
type: object
1266512726
KubernetesEvent:
1266612727
properties:
1266712728
action:
@@ -12780,12 +12841,12 @@ components:
1278012841
type: string
1278112842
type: array
1278212843
autoscaling:
12783-
additionalProperties:
12784-
type: string
12785-
description: 'Autoscaling configuration as key-value pairs. Example: {"metric":
12786-
"QueueBacklogPerWorker", "target": "10"} to scale based on queue
12787-
backlog'
12788-
type: object
12844+
description: Autoscaling configuration for the deployment. Omit or set to
12845+
null to disable autoscaling
12846+
oneOf:
12847+
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
12848+
- $ref: '#/components/schemas/QueueAutoscalingConfig'
12849+
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
1278912850
command:
1279012851
description: Command overrides the container's ENTRYPOINT. Provide as an array
1279112852
(e.g., ["/bin/sh", "-c"])

0 commit comments

Comments
 (0)