Skip to content

Commit a7119de

Browse files
ranchodeluxeranchodeluxe
andauthored
fix horizontal pod autoscaling rules (#140)
* fix horizontal pod autoscaling rules --------- Co-authored-by: ranchodeluxe <[email protected]>
1 parent 8c1f812 commit a7119de

File tree

8 files changed

+18
-10
lines changed

8 files changed

+18
-10
lines changed

docs/autoscaling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ with the `release` name we installed the chart with below `<release-name>-grafan
187187
kubectl get svc -n eoapi-support
188188
```
189189

190+
3. Login and you should be default be able to see the eoapi-k8s grafana dashboard
191+
192+
![](./images/gfdashboard.png)
193+
190194
### Install or Upgrade Autoscaling Changes to `eoapi` Chart
191195

192196
1. If you haven't already decide which services (`vector` || `raster` || `stac`) you want to enable `autoscaling` on change your values yaml for these and redeploy

docs/images/gfdashboard.png

611 KB
Loading

docs/loadtesting.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export INGRESS_ENDPOINT=$(kubectl -n ingress-nginx get svc/ingress-nginx-contro
1818
# k8s-eoapi-ingressn-404721dbb4-e6dec70321c3eddd.elb.us-west-2.amazonaws.com
1919
```
2020

21-
*
22-
2321
2. Then run some naive load testing against some static read-only endpoints in a couple different terminals
2422

2523
```sh

helm-chart/eoapi-support/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: eoapi-support
33

4-
appVersion: "0.1.5"
5-
version: "0.1.5"
4+
appVersion: "0.1.6"
5+
version: "0.1.6"
66

77
dependencies:
88
# Prometheus for collection of metrics.

helm-chart/eoapi-support/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,8 @@ grafana:
162162

163163
dashboardsConfigMaps:
164164
default: "eoapi-dashboards"
165+
166+
167+
metrics-server:
168+
apiService:
169+
create: true

helm-chart/eoapi/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ kubeVersion: ">=1.23.0-0"
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: "0.4.8"
18+
version: "0.4.9"
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.3.14"
24+
appVersion: "0.3.15"
2525

2626
dependencies:
2727
- name: postgrescluster

helm-chart/eoapi/templates/services/hpa.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ spec:
2525
target:
2626
type: Utilization
2727
averageUtilization: {{ index $v "autoscaling" "targets" "cpu" }}
28-
{{- else if or (eq (index $v "autoscaling" "type") "requestRate") (eq (index $v "autoscaling" "type") "both") }}
28+
{{- end }}
29+
{{- if or (eq (index $v "autoscaling" "type") "requestRate") (eq (index $v "autoscaling" "type") "both") }}
2930
# NOTE: 'Object' are custom metrics using third-party plugins such as prometheus + prometheus-adapter
3031
# SEE: ../../../docs/autoscaling.md
3132
- type: Object

helm-chart/eoapi/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ raster:
192192
# https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#quantities
193193
# so when the average unit among these pods is <requestRate>/1000 then scale
194194
# you can watch the actual/target in real time using `kubectl get hpa/<name>`
195-
requestRate: 1000000m
195+
requestRate: 100000m
196196
image:
197197
name: ghcr.io/stac-utils/titiler-pgstac
198198
tag: uvicorn-1.2.0
@@ -254,7 +254,7 @@ stac:
254254
# https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#quantities
255255
# so when the average unit among these pods is <requestRate>/1000 then scale
256256
# you can watch the actual/target in real time using `kubectl get hpa/<name>`
257-
requestRate: 15000000m
257+
requestRate: 100000m
258258
image:
259259
name: ghcr.io/stac-utils/stac-fastapi-pgstac
260260
tag: 2.4.9
@@ -303,7 +303,7 @@ vector:
303303
# https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#quantities
304304
# so when the average unit among these pods is <requestRate>/1000 then scale
305305
# you can watch the actual/target in real time using `kubectl get hpa/<name>`
306-
requestRate: 1000000m
306+
requestRate: 100000m
307307
image:
308308
name: ghcr.io/developmentseed/tipg
309309
tag: uvicorn-0.6.1

0 commit comments

Comments
 (0)