Skip to content

Commit

Permalink
Added Kustomize resources: HorizontalPodAutoscaler for deployment wor…
Browse files Browse the repository at this point in the history
…kloads, update gunicorn.
  • Loading branch information
ropable committed Apr 17, 2024
1 parent cf39200 commit 4cac211
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 14 deletions.
1 change: 0 additions & 1 deletion kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: Deployment
metadata:
name: resourcetracking-deployment
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
Expand Down
17 changes: 17 additions & 0 deletions kustomize/base/deployment_hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: resourcetracking-deployment-hpa
spec:
minReplicas: 1
maxReplicas: 3
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
metrics:
- resource:
name: cpu
target:
type: Utilization
averageUtilization: 250
type: Resource
1 change: 1 addition & 0 deletions kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- deployment_hpa.yaml
- service.yaml
- geoserver_statefulset.yaml
- geoserver_headless.yaml
Expand Down
7 changes: 7 additions & 0 deletions kustomize/overlays/prod/deployment_hpa_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: resourcetracking-deployment-hpa
spec:
scaleTargetRef:
name: resourcetracking-deployment-prod
3 changes: 2 additions & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ labels:
variant: prod
patches:
- path: deployment_patch.yaml
- path: deployment_hpa_patch.yaml
- path: service_patch.yaml
- path: geoserver_statefulset_patch.yaml
- path: geoserver_headless_patch.yaml
- path: geoserver_service_patch.yaml
images:
- name: ghcr.io/dbca-wa/resource_tracking
newTag: 1.4.8
newTag: 1.4.9
7 changes: 7 additions & 0 deletions kustomize/overlays/uat/deployment_hpa_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: resourcetracking-deployment-hpa
spec:
scaleTargetRef:
name: resourcetracking-deployment-uat
1 change: 1 addition & 0 deletions kustomize/overlays/uat/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ labels:
variant: uat
patches:
- path: deployment_patch.yaml
- path: deployment_hpa_patch.yaml
- path: service_patch.yaml
- path: geoserver_statefulset_patch.yaml
- path: geoserver_headless_patch.yaml
Expand Down
21 changes: 11 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "resource_tracking"
version = "1.4.8"
version = "1.4.9"
description = "DBCA internal corporate application to download and serve data from remote tracking devices."
authors = ["DBCA OIM <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -12,7 +12,7 @@ psycopg2 = "2.9.9"
dbca-utils = "2.0.2"
python-dotenv = "1.0.1"
dj-database-url = "2.1.0"
gunicorn = "21.2.0"
gunicorn = "22.0.0"
django-extensions = "3.2.3"
django-tastypie = "0.14.6"
django-geojson = "4.0.0"
Expand Down

0 comments on commit 4cac211

Please sign in to comment.