mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
140 lines
3.2 KiB
YAML
140 lines
3.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: excluded-deployment
|
|
labels:
|
|
app: my-app
|
|
color: blue
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: my-app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: my-app
|
|
color: blue
|
|
spec:
|
|
containers:
|
|
- name: nginx-container
|
|
image: nginx:latest
|
|
ports:
|
|
- containerPort: 80
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: "256Mi"
|
|
requests:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
- name: redis-container
|
|
image: redis:latest
|
|
ports:
|
|
- containerPort: 6379
|
|
resources:
|
|
limits:
|
|
cpu: "0.5"
|
|
memory: "512Mi"
|
|
requests:
|
|
cpu: "0.25"
|
|
memory: "256Mi"
|
|
- name: busybox-container
|
|
image: busybox:latest
|
|
command: ["/bin/sh", "-c", "while true; do echo 'Hello from BusyBox'; sleep 10; done"]
|
|
resources:
|
|
limits:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
requests:
|
|
cpu: "0.25"
|
|
memory: "64Mi"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: bad-deployment
|
|
labels:
|
|
app: my-app
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: my-app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: my-app
|
|
spec:
|
|
containers:
|
|
- name: nginx-container
|
|
image: nginx:latest
|
|
ports:
|
|
- containerPort: 80
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: "256Mi"
|
|
requests:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
- name: redis-container
|
|
image: redis:latest
|
|
ports:
|
|
- containerPort: 6379
|
|
resources:
|
|
limits:
|
|
cpu: "0.5"
|
|
memory: "512Mi"
|
|
requests:
|
|
cpu: "0.25"
|
|
memory: "256Mi"
|
|
- name: busybox-container
|
|
image: busybox:latest
|
|
command: ["/bin/sh", "-c", "while true; do echo 'Hello from BusyBox'; sleep 10; done"]
|
|
resources:
|
|
limits:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
requests:
|
|
cpu: "0.25"
|
|
memory: "64Mi"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: good-deployment
|
|
labels:
|
|
app: my-app
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: my-app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: my-app
|
|
spec:
|
|
containers:
|
|
- name: nginx-container
|
|
image: nginx:latest
|
|
ports:
|
|
- containerPort: 80
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: "256Mi"
|
|
requests:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
- name: busybox-container
|
|
image: busybox:latest
|
|
command: ["/bin/sh", "-c", "while true; do echo 'Hello from BusyBox'; sleep 10; done"]
|
|
resources:
|
|
limits:
|
|
cpu: "0.5"
|
|
memory: "128Mi"
|
|
requests:
|
|
cpu: "0.25"
|
|
memory: "64Mi"
|