1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 01:16:55 +00:00
kyverno/documentation/writing-policies.md

17 lines
779 B
Markdown
Raw Normal View History

2019-05-21 15:50:36 -07:00
<small>*[documentation](/README.md#documentation) / Writing Policies*</small>
2019-05-21 14:44:04 -07:00
2019-05-21 11:06:03 -07:00
# Writing Policies
2019-05-21 14:44:04 -07:00
The following picture shows the structure of a Kyverno Policy:
2019-11-13 14:22:54 -08:00
![KyvernoPolicy](images/Kyverno-Policy-Structure.png)
2020-02-06 00:04:19 -08:00
Each Kyverno policy contains one or more rules. Each rule has a `match` clause, an optional `exclude` clause, and one of a `mutate`, `validate`, or `generate` clause.
Each rule can validate, mutate, or generate configurations of matching resources. A rule definition can contain only a single **mutate**, **validate**, or **generate** child node.
2020-01-31 17:44:56 -08:00
These actions are applied to the resource in described order: mutation, validation and then generation.
2020-01-31 14:30:49 -08:00
---
2020-03-18 18:14:41 -07:00
<small>*Read Next >> [Selecting Resources](/documentation/writing-policies-match-exclude.md)*</small>