1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

update api in samples/

This commit is contained in:
Shuting Zhao 2019-11-13 13:56:20 -08:00
parent eab9609c6a
commit 051eba058f
65 changed files with 65 additions and 65 deletions

View file

@ -9,7 +9,7 @@ A default `NetworkPolicy` should be configured for each namespace to default den
[add_network_policy.yaml](best_practices/add_network_policy.yaml) [add_network_policy.yaml](best_practices/add_network_policy.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: add-networkpolicy name: add-networkpolicy

View file

@ -11,7 +11,7 @@ To limit the number of resources like CPU and memory, as well as objects that ma
[add_ns_quota.yaml](best_practices/add_ns_quota.yaml) [add_ns_quota.yaml](best_practices/add_ns_quota.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: add-ns-quota name: add-ns-quota

View file

@ -13,7 +13,7 @@ This policy matches and mutates pods with `emptyDir` and `hostPath` volumes, to
[add_safe_to_evict_annotation.yaml](best_practices/add_safe_to_evict.yaml) [add_safe_to_evict_annotation.yaml](best_practices/add_safe_to_evict.yaml)
````yaml ````yaml
apiVersion: "kyverno.io/v1alpha1" apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy" kind: "ClusterPolicy"
metadata: metadata:
name: "add-safe-to-evict" name: "add-safe-to-evict"

View file

@ -7,7 +7,7 @@ All processes inside the pod can be made to run with specific user and groupID b
[policy_validate_user_group_fsgroup_id.yaml](more/policy_validate_user_group_fsgroup_id.yaml) [policy_validate_user_group_fsgroup_id.yaml](more/policy_validate_user_group_fsgroup_id.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: validate-userid-groupid-fsgroup name: validate-userid-groupid-fsgroup

View file

@ -7,7 +7,7 @@ The volume of type `hostPath` allows pods to use host bind mounts (i.e. director
[disallow_bind_mounts.yaml](best_practices/disallow_bind_mounts.yaml) [disallow_bind_mounts.yaml](best_practices/disallow_bind_mounts.yaml)
````yaml ````yaml
apiVersion: "kyverno.io/v1alpha1" apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy" kind: "ClusterPolicy"
metadata: metadata:
name: "disallow-bind-mounts" name: "disallow-bind-mounts"

View file

@ -7,7 +7,7 @@ Kubernetes namespaces are an optional feature that provide a way to segment and
[disallow_default_namespace.yaml](best_practices/disallow_default_namespace.yaml) [disallow_default_namespace.yaml](best_practices/disallow_default_namespace.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-default-namespace name: disallow-default-namespace

View file

@ -9,7 +9,7 @@ to manage containers outside of Kubernetes, and hence should not be allowed.
[disallow_docker_sock_mount.yaml](best_practices/disallow_docker_sock_mount.yaml) [disallow_docker_sock_mount.yaml](best_practices/disallow_docker_sock_mount.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-docker-sock-mount name: disallow-docker-sock-mount

View file

@ -7,7 +7,7 @@ Tiller has known security challenges. It requires adminstrative privileges and a
[disallow_helm_tiller.yaml](best_practices/disallow_helm_tiller.yaml) [disallow_helm_tiller.yaml](best_practices/disallow_helm_tiller.yaml)
````yaml ````yaml
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-helm-tiller name: disallow-helm-tiller

View file

@ -9,7 +9,7 @@ Using `hostPort` and `hostNetwork` allows pods to share the host networking stac
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-host-network-port name: disallow-host-network-port

View file

@ -9,7 +9,7 @@ To avoid pod container from having visibility to host process space, validate th
[disallow_host_pid_ipc.yaml](best_practices/disallow_host_pid_ipc.yaml) [disallow_host_pid_ipc.yaml](best_practices/disallow_host_pid_ipc.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-host-pid-ipc name: disallow-host-pid-ipc

View file

@ -8,7 +8,7 @@ The `:latest` tag is mutable and can lead to unexpected errors if the upstream i
````yaml ````yaml
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-latest-tag name: disallow-latest-tag

View file

@ -11,7 +11,7 @@ default capabilities.
[disallow_new_capabilities.yaml](best_practices/disallow_new_capabilities.yaml) [disallow_new_capabilities.yaml](best_practices/disallow_new_capabilities.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-new-capabilities name: disallow-new-capabilities

View file

@ -9,7 +9,7 @@ To disallow privileged containers and privilege escalation, run pod containers w
[disallow_privileged.yaml](best_practices/disallow_privileged.yaml) [disallow_privileged.yaml](best_practices/disallow_privileged.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-privileged name: disallow-privileged

View file

@ -11,7 +11,7 @@ By default, all processes in a container run as the root user (uid 0). To preven
[disallow_root_user.yaml](best_practices/disallow_root_user.yaml) [disallow_root_user.yaml](best_practices/disallow_root_user.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-root-user name: disallow-root-user

View file

@ -12,7 +12,7 @@ The Sysctl interface allows modifications to kernel parameters at runtime. In a
[disallow_sysctls.yaml](best_practices/disallow_sysctls.yaml) [disallow_sysctls.yaml](best_practices/disallow_sysctls.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-sysctls name: disallow-sysctls

View file

@ -9,7 +9,7 @@ For each pod, a periodic `livenessProbe` is performed by the kubelet to determin
[require_probes.yaml](best_practices/require_probes.yaml) [require_probes.yaml](best_practices/require_probes.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-pod-probes name: require-pod-probes

View file

@ -9,7 +9,7 @@ If a namespace level request or limit is specified, defaults will automatically
[require_pod_requests_limits.yaml](best_practices/require_pod_requests_limits.yaml) [require_pod_requests_limits.yaml](best_practices/require_pod_requests_limits.yaml)
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-pod-requests-limits name: require-pod-requests-limits

View file

@ -8,7 +8,7 @@ A read-only root file system helps to enforce an immutable infrastructure strate
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-ro-rootfs name: require-ro-rootfs

View file

@ -7,7 +7,7 @@ Kubernetes automatically mounts service account credentials in each pod. The ser
[restrict_automount_sa_token.yaml](more/restrict_automount_sa_token.yaml) [restrict_automount_sa_token.yaml](more/restrict_automount_sa_token.yaml)
````yaml ````yaml
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-automount-sa-token name: restrict-automount-sa-token

View file

@ -9,7 +9,7 @@ You can customize this policy to allow image registries that you trust.
[restrict_image_registries.yaml](more/restrict_image_registries.yaml) [restrict_image_registries.yaml](more/restrict_image_registries.yaml)
````yaml ````yaml
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-image-registries name: restrict-image-registries

View file

@ -7,7 +7,7 @@ It can be useful to restrict Ingress resources to a set of known ingress classes
[restrict_ingress_classes.yaml](more/restrict_ingress_classes.yaml) [restrict_ingress_classes.yaml](more/restrict_ingress_classes.yaml)
````yaml ````yaml
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-ingress-classes name: restrict-ingress-classes

View file

@ -12,7 +12,7 @@ Although NodePort services can be useful, their use should be limited to service
````yaml ````yaml
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-node-port name: restrict-node-port

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: add-networkpolicy name: add-networkpolicy

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: add-ns-quota name: add-ns-quota

View file

@ -1,4 +1,4 @@
apiVersion: "kyverno.io/v1alpha1" apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy" kind: "ClusterPolicy"
metadata: metadata:
name: "add-safe-to-evict" name: "add-safe-to-evict"

View file

@ -1,4 +1,4 @@
apiVersion: "kyverno.io/v1alpha1" apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy" kind: "ClusterPolicy"
metadata: metadata:
name: "disallow-bind-mounts" name: "disallow-bind-mounts"

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-default-namespace name: disallow-default-namespace

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-docker-sock-mount name: disallow-docker-sock-mount

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-helm-tiller name: disallow-helm-tiller

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: host-network-port name: host-network-port

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-host-pid-ipc name: disallow-host-pid-ipc

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-latest-tag name: disallow-latest-tag

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-new-capabilities name: disallow-new-capabilities

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-privileged name: disallow-privileged

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-root-user name: disallow-root-user

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: disallow-sysctls name: disallow-sysctls

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-pod-requests-limits name: require-pod-requests-limits

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-pod-probes name: require-pod-probes

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: require-ro-rootfs name: require-ro-rootfs

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-automount-sa-token name: restrict-automount-sa-token

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-image-registries name: restrict-image-registries

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-ingress-classes name: restrict-ingress-classes

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: restrict-nodeport name: restrict-nodeport

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : policy-deployment name : policy-deployment

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : policy-endpoints name : policy-endpoints

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: mutate-pod-disable-automoutingapicred name: mutate-pod-disable-automoutingapicred

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: policy-qos name: policy-qos

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : policy-cm name : policy-cm

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: query1 name: query1

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: query1 name: query1

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: check-cpu-memory name: check-cpu-memory

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: check-host-path name: check-host-path

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: image-pull-policy name: image-pull-policy

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : validation-example2 name : validation-example2

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : validation-example2 name : validation-example2

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: check-node-port name: check-node-port

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name : check-non-root name : check-non-root

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name: check-probe-exists name: check-probe-exists

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name: check-probe-intervals name: check-probe-intervals

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: check-registries name: check-registries

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: validate-default-proc-mount name: validate-default-proc-mount

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: validate-disallow-default-serviceaccount name: validate-disallow-default-serviceaccount

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind : ClusterPolicy kind : ClusterPolicy
metadata : metadata :
name: check-probe-exists name: check-probe-exists

View file

@ -1,4 +1,4 @@
apiVersion: kyverno.io/v1alpha1 apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: validate-selinux-options name: validate-selinux-options

View file

@ -1,4 +1,4 @@
apiVersion : kyverno.io/v1alpha1 apiVersion : kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: validate-volumes-whitelist name: validate-volumes-whitelist