mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-28 09:11:18 +00:00
🔧 Minor update to Kyverno chapter and manifests
This commit is contained in:
@@ -3,7 +3,7 @@ kind: ClusterPolicy
|
||||
metadata:
|
||||
name: pod-color-policy-1
|
||||
spec:
|
||||
validationFailureAction: enforce
|
||||
validationFailureAction: Enforce
|
||||
rules:
|
||||
- name: ensure-pod-color-is-valid
|
||||
match:
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: ClusterPolicy
|
||||
metadata:
|
||||
name: pod-color-policy-2
|
||||
spec:
|
||||
validationFailureAction: enforce
|
||||
validationFailureAction: Enforce
|
||||
background: false
|
||||
rules:
|
||||
- name: prevent-color-change
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: ClusterPolicy
|
||||
metadata:
|
||||
name: pod-color-policy-3
|
||||
spec:
|
||||
validationFailureAction: enforce
|
||||
validationFailureAction: Enforce
|
||||
background: false
|
||||
rules:
|
||||
- name: prevent-color-change
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
- It's not the only solution!
|
||||
|
||||
(see e.g. [Open Policy Agent](https://www.openpolicyagent.org/docs/v0.12.2/kubernetes-admission-control/))
|
||||
(see e.g. [Open Policy Agent](https://www.openpolicyagent.org/docs/v0.12.2/kubernetes-admission-control/) or [Validating Admission Policies](https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/))
|
||||
|
||||
---
|
||||
|
||||
@@ -148,19 +148,23 @@
|
||||
|
||||
## Installing Kyverno
|
||||
|
||||
- Kyverno can be installed with a (big) YAML manifest
|
||||
The recommended [installation method][install-kyverno] is to use Helm charts.
|
||||
|
||||
(It's also possible to install with a single YAML manifest.)
|
||||
|
||||
- ... or with Helm charts (which allows to customize a few things)
|
||||
|
||||
.lab[
|
||||
|
||||
- Install Kyverno:
|
||||
```bash
|
||||
kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/release-1.7/config/release/install.yaml
|
||||
helm upgrade --install --repo https://kyverno.github.io/kyverno/ \
|
||||
--namespace kyverno --create-namespace kyverno kyverno
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
[install-kyverno]: https://kyverno.io/docs/installation/methods/
|
||||
|
||||
---
|
||||
|
||||
## Kyverno policies in a nutshell
|
||||
@@ -584,7 +588,7 @@ class: extra-details
|
||||
|
||||
- See [Linking resources with ownerReferences][ownerref] for an example
|
||||
|
||||
[ownerref]: https://kyverno.io/docs/writing-policies/generate/#linking-resources-with-ownerreferences
|
||||
[ownerref]: https://kyverno.io/docs/writing-policies/generate/#linking-trigger-with-downstream
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user