Skip to content

Commit

Permalink
chore: update policy versioning (#382)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Peabody <[email protected]>
Co-authored-by: Rita Zhang <[email protected]>
  • Loading branch information
apeabody and ritazh authored Aug 14, 2023
1 parent db40284 commit 23cc101
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ Each new policy should contain:
* `kustomization.yaml` and `suite.yaml` under `library/<policy-name>`
* The rego source, as `src.rego` and unit tests as `src_test.rego` in the corresponding subdirectory under `src/<policy-name>`
* [Versioning](https://docs.google.com/document/d/1IYiypA-mRcdfSVfmoeyuaeG8XtA1u4GkcqH3kEkv2uw/edit) has been introduced for Gatekeeper Library policies. Please make sure to add or bump the version of the policy as per the guidelines in the `src/<policy-name>/constraint.tmpl` annotation.
* Major version bump required: Whenever there is a breaking change in the policy e.g. updating template Kind, parameter schema, or any other breaking changes
* Major version bump required: Whenever there is a breaking change in the policy e.g. updating template Kind, updating existing parameter schema, adding the `requires-sync-data` annotation to sync new data, or any other breaking changes
* Minor version bump required: Whenever there is a backward compatible change in the policy e.g. adding a parameter, updating Rego logic
* Patch version bump required: Whenever there is a simple backward compatible change in the policy, e.g. Simple Rego fix, updating policy metadata
* Note: Sample constraints, mutations, and expansion templates are provided as examples, and severable changes do not require a version bump.

### Development

Expand Down
3 changes: 2 additions & 1 deletion website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ Each new policy should contain:
* `kustomization.yaml` and `suite.yaml` under `library/<policy-name>`
* The rego source, as `src.rego` and unit tests as `src_test.rego` in the corresponding subdirectory under `src/<policy-name>`
* [Versioning](https://docs.google.com/document/d/1IYiypA-mRcdfSVfmoeyuaeG8XtA1u4GkcqH3kEkv2uw/edit) has been introduced for Gatekeeper Library policies. Please make sure to add or bump the version of the policy as per the guidelines in the `src/<policy-name>/constraint.tmpl` annotation.
* Major version bump required: Whenever there is a breaking change in the policy e.g. updating template Kind, parameter schema, or any other breaking changes
* Major version bump required: Whenever there is a breaking change in the policy e.g. updating template Kind, updating existing parameter schema, adding the `requires-sync-data` annotation to sync new data, or any other breaking changes
* Minor version bump required: Whenever there is a backward compatible change in the policy e.g. adding a parameter, updating Rego logic
* Patch version bump required: Whenever there is a simple backward compatible change in the policy, e.g. Simple Rego fix, updating policy metadata
* Note: Sample constraints, mutations, and expansion templates are provided as examples, and severable changes do not require a version bump.

### Development

Expand Down

0 comments on commit 23cc101

Please sign in to comment.