Skip to content

Commit

Permalink
Add tracking autoscaler and increment janitor release (#173)
Browse files Browse the repository at this point in the history
* upgrade memory for tracking-consumer

* add a default tracking-consumer HPA that acts very similarly to zip-consumer

* update redis janitor to 0.3.0 and clean both predict and track queues
  • Loading branch information
willgraf authored Sep 7, 2019
1 parent c11339c commit df3675f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 1 deletion conf/helmfile.d/0220.redis-janitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ releases:

image:
repository: "vanvalenlab/kiosk-redis-janitor"
tag: "0.2"
tag: "0.3.0"
pullPolicy: "Always"

serviceAccount:
Expand All @@ -49,6 +49,7 @@ releases:
# memory: 64Mi

env:
QUEUES: "predict,track"
DEBUG: "true"
INTERVAL: "5"
REDIS_HOST: "redis"
Expand Down
2 changes: 1 addition & 1 deletion conf/helmfile.d/0250.tracking-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ releases:
resources:
requests:
cpu: 300m
memory: 128Mi
memory: 256Mi
# limits:
# cpu: 100m
# memory: 1024Mi
Expand Down
12 changes: 12 additions & 0 deletions conf/helmfile.d/0600.prometheus-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@ releases:
labels:
namespace: deepcell
service: zip-scaling-service
- record: tracking_consumer_key_ratio
expr: |-
avg_over_time(redis_script_value{key="track_image_keys"}[15s])
/ on()
(
avg_over_time(kube_deployment_spec_replicas{deployment="tracking-consumer"}[15s])
+
1
)
labels:
namespace: deepcell
service: tracking-scaling-service

##
global:
Expand Down
12 changes: 8 additions & 4 deletions conf/patches/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ spec:
minReplicas: 1
maxReplicas: $GPU_MAX_TIMES_FIFTY
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
- type: Object
object:
metricName: tracking_consumer_key_ratio
target:
apiVersion: v1
kind: Namespace
name: tracking_consumer_key_ratio
targetValue: 1

0 comments on commit df3675f

Please sign in to comment.