mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-01 07:55:06 +02:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: delete-cpu-limits
|
|
annotations:
|
|
policies.kyverno.io/title: Delete CPU limits
|
|
policies.kyverno.io/subject: Pod
|
|
policies.kyverno.io/description: >-
|
|
This policy deletes CPU limits from all Pods.
|
|
spec:
|
|
mutateExistingOnPolicyUpdate: true
|
|
generateExistingOnPolicyUpdate: true
|
|
rules:
|
|
- name: delete-cpu-limits
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds: ["Pod"]
|
|
exclude:
|
|
any:
|
|
- resources:
|
|
namespaces:
|
|
- calico-system
|
|
- tigera-operator
|
|
- resources:
|
|
kinds: ["Pod"]
|
|
selector:
|
|
matchLabels:
|
|
job-name: "*"
|
|
- resources:
|
|
kinds: ["Pod"]
|
|
selector:
|
|
matchLabels:
|
|
statefulset.kubernetes.io/pod-name: "*"
|
|
- resources:
|
|
annotations:
|
|
kyverno.io/ignore: "true"
|
|
mutate:
|
|
patchStrategicMerge:
|
|
spec:
|
|
initContainers:
|
|
- (name): "*"
|
|
resources:
|
|
limits:
|
|
cpu: null
|
|
containers:
|
|
- (name): "*"
|
|
resources:
|
|
limits:
|
|
cpu: null
|