mirror of
https://github.com/jominjun94/k8s-cpu-limit-check-operator.git
synced 2026-01-29 13:45:35 +00:00
feat: add cpu-reaper-operator source code
This commit is contained in:
28
config/samples/cpu-stress-deployment.yaml
Normal file
28
config/samples/cpu-stress-deployment.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cpu-stress
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: stress
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: stress
|
||||
spec:
|
||||
containers:
|
||||
- name: stress
|
||||
image: busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- "while true; do :; done"
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
limits:
|
||||
cpu: "100m"
|
||||
|
||||
4
config/samples/kustomization.yaml
Normal file
4
config/samples/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
## Append samples of your project ##
|
||||
resources:
|
||||
- reaper_v1alpha1_cpureaperpolicy.yaml
|
||||
#+kubebuilder:scaffold:manifestskustomizesamples
|
||||
13
config/samples/reaper_v1alpha1_cpureaperpolicy.yaml
Normal file
13
config/samples/reaper_v1alpha1_cpureaperpolicy.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: reaper.cpu.limit.check/v1alpha1
|
||||
kind: CpuReaperPolicy
|
||||
metadata:
|
||||
name: cpu-reaper
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: stress
|
||||
thresholdPercent: 100
|
||||
forSeconds: 30
|
||||
checkIntervalSeconds: 10
|
||||
|
||||
Reference in New Issue
Block a user