1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/definitions/install.yaml

196 lines
5.3 KiB
YAML
Raw Normal View History

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: policies.kyverno.io
spec:
group: kyverno.io
versions:
- name: v1alpha1
served: true
storage: true
scope: Cluster
names:
kind: Policy
plural: policies
singular: policy
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
required:
- rules
# set as required, as we cannot set default yet. check below for more details
- mode
properties:
mode:
type: string
# default can only be set if CustomResourceDefaulting feature gate is enabled
# default: blockChanges
enum:
- blockChanges
- reportViolation
rules:
type: array
items:
type: object
required:
- name
- resource
2019-05-21 21:37:54 +00:00
properties:
name:
type: string
resource:
type: object
required:
- kinds
2019-05-21 21:37:54 +00:00
properties:
kinds:
type: array
items:
type: string
name:
type: string
2019-07-01 22:21:50 +00:00
namespace:
type: string
selector:
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
required:
- key
- operator
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
mutate:
type: object
properties:
overlay:
AnyValue: {}
patches:
type: array
items:
type: object
required:
- path
- op
properties:
path:
type: string
op:
type: string
enum:
- add
- replace
- remove
value:
AnyValue: {}
validate:
type: object
required:
- pattern
properties:
message:
type: string
pattern:
AnyValue: {}
generate:
2019-05-21 21:37:54 +00:00
type: object
required:
- kind
- name
properties:
kind:
type: string
name:
type: string
clone:
2019-05-21 21:37:54 +00:00
type: object
required:
- namespace
- name
properties:
namespace:
type: string
2019-05-21 21:37:54 +00:00
name:
type: string
2019-05-21 21:37:54 +00:00
data:
2019-06-01 00:59:36 +00:00
AnyValue: {}
---
kind: Namespace
apiVersion: v1
metadata:
name: "kyverno"
---
apiVersion: v1
kind: Service
metadata:
namespace: kyverno
name: kyverno-svc
labels:
app: kyverno
spec:
ports:
- port: 443
targetPort: 443
selector:
app: kyverno
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kyverno-service-account
namespace: kyverno
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: kyverno-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kyverno-service-account
namespace: kyverno
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: kyverno
2019-06-27 18:38:34 +00:00
name: kyverno
labels:
app: kyverno
spec:
replicas: 1
template:
metadata:
labels:
app: kyverno
spec:
serviceAccountName: kyverno-service-account
containers:
- name: kyverno
image: nirmata/kyverno:dev-testing
2019-06-19 21:05:23 +00:00
args: ["--filterKind","Nodes,Events,APIService,SubjectAccessReview"]
ports:
- containerPort: 443
securityContext:
privileged: true