watch pods instead of polling
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m57s

This commit is contained in:
matst80
2024-11-10 10:26:21 +01:00
parent 1628c8ca31
commit 351280347b
6 changed files with 90 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ metadata:
name: cart-discovery
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods","services"]
resources: ["pods","services", "deployments"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1

View File

@@ -4,8 +4,9 @@ metadata:
name: cart-scaler
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: cart-actor
minReplicas: 1
maxReplicas: 5
minReplicas: 2
maxReplicas: 8
targetCPUUtilizationPercentage: 50