Skip to content

Commit

Permalink
feat: hpa
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrodrigo19 committed Oct 16, 2024
1 parent e952ea7 commit cea61a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions infra/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,41 @@ spec:
ports:
- containerPort: 8000
env:
- name: DB_HOST
- name: POSTGRES_HOST
value: "postgres-service"
- name: DB_PORT
- name: POSTGRES_PORT
value: "5432"
- name: DB_NAME
value: "orders_db"
- name: DB_USER
- name: POSTGRES_DB
value: "ambrosia_db"
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-secret
key: POSTGRES_USER
- name: DB_PASSWORD
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secret
key: POSTGRES_PASSWORD
readinessProbe:
httpGet:
path: /health
port: 8000
port: 30000
initialDelaySeconds: 30
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 8000
port: 30000
initialDelaySeconds: 30
periodSeconds: 60
startupProbe:
httpGet:
path: /health
port: 8000
port: 30000
failureThreshold: 3
periodSeconds: 10
initialDelaySeconds: 60
resources:
requests:
cpu: 1m
Expand Down
2 changes: 1 addition & 1 deletion infra/hpa.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: autoscaling/v2beta2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: api-hpa
Expand Down

0 comments on commit cea61a1

Please sign in to comment.