Skip to content

Instantly share code, notes, and snippets.

@pt033302
Last active May 5, 2020 09:40
Show Gist options
  • Save pt033302/822c56806558a56fc960a9f8d33f00d9 to your computer and use it in GitHub Desktop.
Save pt033302/822c56806558a56fc960a9f8d33f00d9 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: LimitRange
metadata:
name: limit-mem-cpu-per-container
spec:
limits:
- max:
cpu: "800m"
memory: "100Mi"
min:
cpu: "100m"
memory: "50Mi"
default:
cpu: "700m"
memory: "50Mi"
defaultRequest:
cpu: "110m"
memory: "50Mi"
type: Container
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: stress-test
spec:
steps:
- name: test-1
image: polinux/stress
command:
- "stress"
args:
- "-c"
- "2"
- "-i"
- "1"
- "-m"
- "2"
- "--vm-bytes"
- "25M"
- "-t"
- "10s"
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-stress-test
spec:
tasks:
- name: test
taskRef:
name: stress-test
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pipeline-stress-oom-run
spec:
pipelineRef:
name: pipeline-stress-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment