add kyverno policies
Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
parent
4be877e419
commit
baa0216960
35 changed files with 843 additions and 39 deletions
49
platform/kyverno/policies/00-meta/cleanup-rbac.yaml
Normal file
49
platform/kyverno/policies/00-meta/cleanup-rbac.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kyverno:cleanup-extra-resources
|
||||
labels:
|
||||
rbac.kyverno.io/aggregate-to-cleanup-controller: "true"
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
- cronjobs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
13
platform/kyverno/policies/00-meta/kustomization.yaml
Normal file
13
platform/kyverno/policies/00-meta/kustomization.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- cleanup-rbac.yaml
|
||||
- kyverno-cilium-rbac.yaml
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/part-of: kyverno-policies
|
||||
policy-tier: meta
|
||||
|
||||
commonAnnotations:
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
53
platform/kyverno/policies/00-meta/kyverno-cilium-rbac.yaml
Normal file
53
platform/kyverno/policies/00-meta/kyverno-cilium-rbac.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kyverno:generate-cilium-cnps
|
||||
labels:
|
||||
kyverno.io/aggregate-to-background: "true"
|
||||
kyverno.io/aggregate-to-reports: "true"
|
||||
app.kubernetes.io/component: kyverno
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- cilium.io
|
||||
resources:
|
||||
- ciliumnetworkpolicies
|
||||
verbs:
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kyverno:generate-cilium-cnps-background-binding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kyverno-background-controller
|
||||
namespace: kyverno
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: kyverno:generate-cilium-cnps
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kyverno:generate-cilium-cnps-admission-binding
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kyverno-admission-controller
|
||||
namespace: kyverno
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: kyverno:generate-cilium-cnps
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
Loading…
Add table
Add a link
Reference in a new issue