Skip to content

Commit

Permalink
operator kyverno-operator (1.12.6)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Kang <[email protected]>
  • Loading branch information
selenehyun committed Nov 12, 2024
1 parent 8aabc6e commit a2ed896
Show file tree
Hide file tree
Showing 22 changed files with 49,294 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@

apiVersion: v1
kind: ConfigMap
metadata:
name: kyverno
namespace: kyverno
labels:
app.kubernetes.io/component: config
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
annotations:
helm.sh/resource-policy: "keep"
data:
enableDefaultRegistryMutation: "true"
defaultRegistry: "docker.io"
generateSuccessEvents: "false"
excludeGroups: "system:nodes"
resourceFilters: >-
[*/*,kyverno,*]
[Event,*,*]
[*/*,kube-system,*]
[*/*,kube-public,*]
[*/*,kube-node-lease,*]
[Node,*,*]
[Node/*,*,*]
[APIService,*,*]
[APIService/*,*,*]
[TokenReview,*,*]
[SubjectAccessReview,*,*]
[SelfSubjectAccessReview,*,*]
[Binding,*,*]
[Pod/binding,*,*]
[ReplicaSet,*,*]
[ReplicaSet/*,*,*]
[AdmissionReport,*,*]
[AdmissionReport/*,*,*]
[ClusterAdmissionReport,*,*]
[ClusterAdmissionReport/*,*,*]
[BackgroundScanReport,*,*]
[BackgroundScanReport/*,*,*]
[ClusterBackgroundScanReport,*,*]
[ClusterBackgroundScanReport/*,*,*]
[ClusterRole,*,kyverno:admission-controller]
[ClusterRole,*,kyverno:admission-controller:core]
[ClusterRole,*,kyverno:admission-controller:additional]
[ClusterRole,*,kyverno:background-controller]
[ClusterRole,*,kyverno:background-controller:core]
[ClusterRole,*,kyverno:background-controller:additional]
[ClusterRole,*,kyverno:cleanup-controller]
[ClusterRole,*,kyverno:cleanup-controller:core]
[ClusterRole,*,kyverno:cleanup-controller:additional]
[ClusterRole,*,kyverno:reports-controller]
[ClusterRole,*,kyverno:reports-controller:core]
[ClusterRole,*,kyverno:reports-controller:additional]
[ClusterRoleBinding,*,kyverno:admission-controller]
[ClusterRoleBinding,*,kyverno:background-controller]
[ClusterRoleBinding,*,kyverno:cleanup-controller]
[ClusterRoleBinding,*,kyverno:reports-controller]
[ServiceAccount,kyverno,kyverno-admission-controller]
[ServiceAccount/*,kyverno,kyverno-admission-controller]
[ServiceAccount,kyverno,kyverno-background-controller]
[ServiceAccount/*,kyverno,kyverno-background-controller]
[ServiceAccount,kyverno,kyverno-cleanup-controller]
[ServiceAccount/*,kyverno,kyverno-cleanup-controller]
[ServiceAccount,kyverno,kyverno-reports-controller]
[ServiceAccount/*,kyverno,kyverno-reports-controller]
[Role,kyverno,kyverno:admission-controller]
[Role,kyverno,kyverno:background-controller]
[Role,kyverno,kyverno:cleanup-controller]
[Role,kyverno,kyverno:reports-controller]
[RoleBinding,kyverno,kyverno:admission-controller]
[RoleBinding,kyverno,kyverno:background-controller]
[RoleBinding,kyverno,kyverno:cleanup-controller]
[RoleBinding,kyverno,kyverno:reports-controller]
[ConfigMap,kyverno,kyverno]
[ConfigMap,kyverno,kyverno-metrics]
[Deployment,kyverno,kyverno-admission-controller]
[Deployment/*,kyverno,kyverno-admission-controller]
[Deployment,kyverno,kyverno-background-controller]
[Deployment/*,kyverno,kyverno-background-controller]
[Deployment,kyverno,kyverno-cleanup-controller]
[Deployment/*,kyverno,kyverno-cleanup-controller]
[Deployment,kyverno,kyverno-reports-controller]
[Deployment/*,kyverno,kyverno-reports-controller]
[Pod,kyverno,kyverno-admission-controller-*]
[Pod/*,kyverno,kyverno-admission-controller-*]
[Pod,kyverno,kyverno-background-controller-*]
[Pod/*,kyverno,kyverno-background-controller-*]
[Pod,kyverno,kyverno-cleanup-controller-*]
[Pod/*,kyverno,kyverno-cleanup-controller-*]
[Pod,kyverno,kyverno-reports-controller-*]
[Pod/*,kyverno,kyverno-reports-controller-*]
[Job,kyverno,kyverno-hook-pre-delete]
[Job/*,kyverno,kyverno-hook-pre-delete]
[NetworkPolicy,kyverno,kyverno-admission-controller]
[NetworkPolicy/*,kyverno,kyverno-admission-controller]
[NetworkPolicy,kyverno,kyverno-background-controller]
[NetworkPolicy/*,kyverno,kyverno-background-controller]
[NetworkPolicy,kyverno,kyverno-cleanup-controller]
[NetworkPolicy/*,kyverno,kyverno-cleanup-controller]
[NetworkPolicy,kyverno,kyverno-reports-controller]
[NetworkPolicy/*,kyverno,kyverno-reports-controller]
[PodDisruptionBudget,kyverno,kyverno-admission-controller]
[PodDisruptionBudget/*,kyverno,kyverno-admission-controller]
[PodDisruptionBudget,kyverno,kyverno-background-controller]
[PodDisruptionBudget/*,kyverno,kyverno-background-controller]
[PodDisruptionBudget,kyverno,kyverno-cleanup-controller]
[PodDisruptionBudget/*,kyverno,kyverno-cleanup-controller]
[PodDisruptionBudget,kyverno,kyverno-reports-controller]
[PodDisruptionBudget/*,kyverno,kyverno-reports-controller]
[Service,kyverno,kyverno-svc]
[Service/*,kyverno,kyverno-svc]
[Service,kyverno,kyverno-svc-metrics]
[Service/*,kyverno,kyverno-svc-metrics]
[Service,kyverno,kyverno-background-controller-metrics]
[Service/*,kyverno,kyverno-background-controller-metrics]
[Service,kyverno,kyverno-cleanup-controller]
[Service/*,kyverno,kyverno-cleanup-controller]
[Service,kyverno,kyverno-cleanup-controller-metrics]
[Service/*,kyverno,kyverno-cleanup-controller-metrics]
[Service,kyverno,kyverno-reports-controller-metrics]
[Service/*,kyverno,kyverno-reports-controller-metrics]
[ServiceMonitor,kyverno,kyverno-admission-controller]
[ServiceMonitor,kyverno,kyverno-background-controller]
[ServiceMonitor,kyverno,kyverno-cleanup-controller]
[ServiceMonitor,kyverno,kyverno-reports-controller]
[Secret,kyverno,kyverno-svc.kyverno.svc.*]
[Secret,kyverno,kyverno-cleanup-controller.kyverno.svc.*]
webhooks: "[{\"namespaceSelector\":{\"matchExpressions\":[{\"key\":\"kubernetes.io/metadata.name\",\"operator\":\"NotIn\",\"values\":[\"kube-system\"]},{\"key\":\"kubernetes.io/metadata.name\",\"operator\":\"NotIn\",\"values\":[\"kyverno\"]}],\"matchLabels\":null}}]"
webhookAnnotations: "{\"admissions.enforcer/disabled\":\"true\"}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kyverno-metrics
namespace: kyverno
labels:
app.kubernetes.io/component: config
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
data:
namespaces: "{\"exclude\":[],\"include\":[]}"
bucketBoundaries: "0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 20, 25, 30"
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: kyverno-cleanup-admission-reports
namespace: kyverno
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
backoffLimit: 3
template:
metadata:
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
- name: cleanup
image: "bitnami/kubectl:1.28.5"
imagePullPolicy:
command:
- /bin/bash
- -c
- |
set -euo pipefail
COUNT=$(kubectl get admissionreports.kyverno.io -A | wc -l)
if [ "$COUNT" -gt 10000 ]; then
echo "too many reports found ($COUNT), cleaning up..."
kubectl delete admissionreports.kyverno.io -A -l='!audit.kyverno.io/report.aggregate'
else
echo "($COUNT) reports found, no clean up needed"
fi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: kyverno-cleanup-cluster-admission-reports
namespace: kyverno
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
backoffLimit: 3
template:
metadata:
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
- name: cleanup
image: "bitnami/kubectl:1.28.5"
imagePullPolicy:
command:
- /bin/bash
- -c
- |
set -euo pipefail
COUNT=$(kubectl get clusteradmissionreports.kyverno.io -A | wc -l)
if [ "$COUNT" -gt 10000 ]; then
echo "too many reports found ($COUNT), cleaning up..."
kubectl delete clusteradmissionreports.kyverno.io -A -l='!audit.kyverno.io/report.aggregate'
else
echo "($COUNT) reports found, no clean up needed"
fi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: kyverno-cleanup-cluster-ephemeral-reports
namespace: kyverno
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
backoffLimit: 3
template:
metadata:
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
- name: cleanup
image: "bitnami/kubectl:1.28.5"
imagePullPolicy:
command:
- /bin/bash
- -c
- |
set -euo pipefail
COUNT=$(kubectl get clusterephemeralreports.reports.kyverno.io -A | wc -l)
if [ "$COUNT" -gt 10000 ]; then
echo "too many clusterephemeralreports found ($COUNT), cleaning up..."
kubectl delete clusterephemeralreports.reports.kyverno.io -A --all
else
echo "($COUNT) reports found, no clean up needed"
fi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: kyverno-cleanup-ephemeral-reports
namespace: kyverno
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: v1.12.6
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
backoffLimit: 3
template:
metadata:
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
- name: cleanup
image: "bitnami/kubectl:1.28.5"
imagePullPolicy:
command:
- /bin/bash
- -c
- |
set -euo pipefail
COUNT=$(kubectl get ephemeralreports.reports.kyverno.io -A | wc -l)
if [ "$COUNT" -gt 10000 ]; then
echo "too many ephemeralreports found ($COUNT), cleaning up..."
kubectl delete ephemeralreports.reports.kyverno.io -A --all
else
echo "($COUNT) reports found, no clean up needed"
fi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
Loading

0 comments on commit a2ed896

Please sign in to comment.