1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/docs/dev/api
Aditya Kumar bdeb172a7e
Minor changes in dev docs (#11266)
Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
2024-09-30 13:54:02 +00:00
..
README.md Minor changes in dev docs (#11266) 2024-09-30 13:54:02 +00:00

Kyverno API

This document provides guidance on extending and maintaining the Kyverno API

Concepts

API Groups

All Kyverno resources are currently defined in the kyverno.io API group.

API Versions

This kyverno.io has the following versions:

  • v1apha1
  • v1apha2
  • v1beta1
  • v1
  • v2Beta1

The v1 version is currently the preferred storage version, but is being deprecated.

The goal is to eventually make v2 the preferred version and remove all v1* versions.

Adding a new Kind (Resource)

New types should not be added to v1 but should be introduced as v2alpha1 and then promoted as they stabilize.

Adding a new attribute

New attributes can be added to existing resources without impacting compatibility. They do not require a new version.

Deleting an attribute

Attributes cannot be deleted in a version. They should be marked for deprecation and removed after 3 minor releases.

Modifying an attribute

Attributes cannot be modified in a version. The existing attribute should be marked for deprecation and a new attribute should be added following version compatibility guidelines.

Stable References

Within the API, newer versions can reference older stable types, but not the other way around. For example, a v1 resource should not refer to a v2alpha1 type. However, a v2alpha1 type can reference v1 types.