added HPA and replication
This commit is contained in:
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: mongo-generator
|
name: mongo-generator
|
||||||
namespace: genearator-stack
|
namespace: genearator-stack
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: mongo-generator
|
app: mongo-generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: pg-generator
|
name: pg-generator
|
||||||
namespace: genearator-stack
|
namespace: genearator-stack
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: pg-generator
|
app: pg-generator
|
||||||
|
|||||||
21
genearator-stack/hpa-mongo-generator.yaml
Normal file
21
genearator-stack/hpa-mongo-generator.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: mongo-generator-hpa
|
||||||
|
namespace: genearator-stack
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: mongo-generator
|
||||||
|
minReplicas: 2
|
||||||
|
maxReplicas: 5
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 70
|
||||||
|
|
||||||
|
|
||||||
21
genearator-stack/hpa-pg-generator.yaml
Normal file
21
genearator-stack/hpa-pg-generator.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: pg-generator-hpa
|
||||||
|
namespace: genearator-stack
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: pg-generator
|
||||||
|
minReplicas: 2
|
||||||
|
maxReplicas: 5
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 70
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user