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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: "kyverno.io/v1alpha1"
apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy"
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: "kyverno.io/v1alpha1"
apiVersion: "kyverno.io/v1"
kind: "ClusterPolicy"
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion : kyverno.io/v1alpha1
apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
name: disallow-helm-tiller

View file

@ -9,7 +9,7 @@ Using `hostPort` and `hostNetwork` allows pods to share the host networking stac
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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
apiVersion : kyverno.io/v1alpha1
apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
name: disallow-latest-tag

View file

@ -11,7 +11,7 @@ default capabilities.
[disallow_new_capabilities.yaml](best_practices/disallow_new_capabilities.yaml)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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
apiVersion: kyverno.io/v1alpha1
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion : kyverno.io/v1alpha1
apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion : kyverno.io/v1alpha1
apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
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)
````yaml
apiVersion : kyverno.io/v1alpha1
apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
name: restrict-ingress-classes

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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