Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def redirect_to_docs():
@app.get("/version", tags=["util"])
def version():
"""Retorna a versão do aplicativo."""
return "2.0.0"
return "3.0.0"


def simulate_heavy_load_randomly():
Expand Down
18 changes: 18 additions & 0 deletions manifests/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: semana-devops-hpa
spec:
scaleTargetRef:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
name: semana-devops
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 75
22 changes: 22 additions & 0 deletions manifests/templates/rollout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ spec:
image: {{ .Values.image }}
ports:
- containerPort: 8081
probes:
startupProbe:
enabled: true
failureThreshold: 10
periodSeconds: 10
httpGet:
path: /startup
port: 8081
readinessProbe:
enabled: true
failureThreshold: 10
periodSeconds: 10
httpGet:
path: /readyz
port: 8081
livenessProbe:
enabled: true
failureThreshold: 10
periodSeconds: 10
httpGet:
path: /liveness
port: 8081
strategy:
canary:
steps:
Expand Down