Files
cloud-native-setup/metrics/lib/cpu_load_daemonset.yaml.in
Graham Whaley c846e9753d metrics: add cpu-load generator code and docs
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>
2019-11-15 12:23:38 -06:00

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@