Merge pull request #1318 from dod-ccpo/hpa

Horizontal autoscaling
This commit is contained in:
raydds 2020-01-16 10:57:50 -05:00 committed by GitHub
commit d89948a59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 34 deletions

View File

@ -0,0 +1,40 @@
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
labels:
app: atst
name: atst
namespace: atat
spec:
minReplicas: 2
maxReplicas: 10
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: atst
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 60
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
labels:
app: atst
name: atst-worker
namespace: atat
spec:
minReplicas: 1
maxReplicas: 10
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: atst-worker
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 60

View File

@ -15,7 +15,6 @@ spec:
selector: selector:
matchLabels: matchLabels:
role: web role: web
replicas: 4
strategy: strategy:
type: RollingUpdate type: RollingUpdate
template: template:
@ -169,7 +168,6 @@ spec:
selector: selector:
matchLabels: matchLabels:
role: worker role: worker
replicas: 2
strategy: strategy:
type: RollingUpdate type: RollingUpdate
template: template:
@ -207,10 +205,10 @@ spec:
resources: resources:
requests: requests:
memory: 280Mi memory: 280Mi
cpu: 20m cpu: 400m
limits: limits:
memory: 280Mi memory: 280Mi
cpu: 20m cpu: 400m
volumes: volumes:
- name: pgsslrootcert - name: pgsslrootcert
configMap: configMap:

View File

@ -12,3 +12,4 @@ resources:
- acme-challenges.yml - acme-challenges.yml
- aadpodidentity.yml - aadpodidentity.yml
- nginx-snippets.yml - nginx-snippets.yml
- autoscaling.yml

View File

@ -5,7 +5,6 @@ resources:
- namespace.yml - namespace.yml
- reset-cron-job.yml - reset-cron-job.yml
patchesStrategicMerge: patchesStrategicMerge:
- replica_count.yml
- ports.yml - ports.yml
- envvars.yml - envvars.yml
- flex_vol.yml - flex_vol.yml

View File

@ -1,14 +0,0 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: atst
spec:
replicas: 2
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: atst-worker
spec:
replicas: 1

View File

@ -5,7 +5,6 @@ resources:
- namespace.yml - namespace.yml
- reset-cron-job.yml - reset-cron-job.yml
patchesStrategicMerge: patchesStrategicMerge:
- replica_count.yml
- ports.yml - ports.yml
- envvars.yml - envvars.yml
- flex_vol.yml - flex_vol.yml

View File

@ -1,14 +0,0 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: atst
spec:
replicas: 2
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: atst-worker
spec:
replicas: 1