Skip to content
Permalink
Browse files

possibility to run all Services with 1 pod

  • Loading branch information...
Schnitzel committed Jun 4, 2019
1 parent 88c71ed commit a97673031223f859becf04e5557c71dd678c00ea
Showing with 255 additions and 0 deletions.
  1. +255 −0 openshift-setup/force-one-pod.yaml
@@ -0,0 +1,255 @@
# This file contains HorizontalPodAutoscaler with max 1 pod for all Lagoon Services that usually are scaled to 2 pods
# In some cases Lagoon is not needed to be running with 2 pods, so instead of forking Lagoon and change all templates
# you can just apply this file with "oc apply -f openshift-setup/force-one-pod.yaml" and the HPA will automatically
# scale the DeploymentConfigs to 1 instead of 2.
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: drush-alias
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: drush-alias
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: api
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: api
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: auth-server
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: auth-server
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: logs-db-ui
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: logs-db-ui
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: logs2logs-db
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: logs2logs-db
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: logs2rocketchat
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: logs2rocketchat
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: logs2slack
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: logs2slack
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftbuilddeploy
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftbuilddeploy
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftbuilddeploymonitor
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftbuilddeploymonitor
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftjobs
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftjobs
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftjobsmonitor
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftjobsmonitor
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftmisc
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftmisc
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: openshiftremove
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: openshiftremove
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: rest2tasks
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: rest2tasks
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: ssh
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: ssh
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: ui
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: ui
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: webhook-handler
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: webhook-handler
targetCPUUtilizationPercentage: 80

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: webhooks2tasks
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: webhooks2tasks
targetCPUUtilizationPercentage: 80

0 comments on commit a976730

Please sign in to comment.
You can’t perform that action at this time.