-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tim Kang <[email protected]>
- Loading branch information
1 parent
8aabc6e
commit a2ed896
Showing
22 changed files
with
49,294 additions
and
0 deletions.
There are no files selected for viewing
131 changes: 131 additions & 0 deletions
131
operators/kyverno-operator/1.12.6/manifests/kyverno-operator.configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\"}" |
13 changes: 13 additions & 0 deletions
13
operators/kyverno-operator/1.12.6/manifests/kyverno-operator.configmap_metrics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
199 changes: 199 additions & 0 deletions
199
operators/kyverno-operator/1.12.6/manifests/kyverno-operator.cronjob_v1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.