mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-08-19 05:27:26 +00:00
c846e9753d
Add library code that can generate a variety of cpu loads across the cluster. Configuration is via environment variables, documented in the .md file. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
31 lines
774 B
Plaintext
31 lines
774 B
Plaintext
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: cpu-load
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
name: cpu-load-pods
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: cpu-load-pods
|
|
spec:
|
|
hostNetwork: true
|
|
terminationGracePeriodSeconds: 0
|
|
containers:
|
|
- name: cpu-load
|
|
imagePullPolicy: IfNotPresent
|
|
image: polinux/stress-ng
|
|
command: ["stress-ng"]
|
|
args: # comment fields here so we can *delete* sections on demand
|
|
- "--cpu"
|
|
- "@CPU_NCPU@"
|
|
- "-l" #CPU_PERCENT
|
|
- "@CPU_PERCENT@" #CPU_PERCENT
|
|
resources:
|
|
limits:
|
|
cpu: @CPU_LIMIT@
|
|
requests:
|
|
cpu: @CPU_REQUEST@
|