Skip to content

Instantly share code, notes, and snippets.

@hardys
Last active July 30, 2020 08:52
Show Gist options
  • Save hardys/41a77adb69661d6c97e722905c0db169 to your computer and use it in GitHub Desktop.
Save hardys/41a77adb69661d6c97e722905c0db169 to your computer and use it in GitHub Desktop.
apiVersion: "autoscaling.openshift.io/v1"
kind: "ClusterAutoscaler"
metadata:
name: "default"
spec:
podPriorityThreshold: -10
resourceLimits:
maxNodesTotal: 5
scaleDown:
enabled: true
delayAfterAdd: 10s
unneededTime: 10s
FROM docker.io/centos:centos8
RUN dnf install -y epel-release && dnf install -y stress && dnf clean all
apiVersion: "autoscaling.openshift.io/v1beta1"
kind: "MachineAutoscaler"
metadata:
name: "scale-automatic"
namespace: "openshift-machine-api"
spec:
minReplicas: 3
maxReplicas: 5
scaleTargetRef:
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
name: ostest-wb5t4-worker-0
apiVersion: apps/v1
kind: Deployment
metadata:
name: stress-deployment
spec:
selector:
matchLabels:
app: stress
replicas: 2
template:
metadata:
labels:
app: stress
spec:
containers:
- image: 'virthost.ostest.test.metalkube.org:5000/localimages/stress:latest'
name: stress
command:
- stress
args:
- '--vm'
- '1'
- '--vm-bytes'
- '6g'
resources:
requests:
memory: "6500Mi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment