1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/test/conformance/chainsaw/reports/admission/label
Mohd Kamaal e771896541
distributed labels in group, version, and resource so it doesn't exceed (#11620)
* change label to hash if exceed 63 limit char

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>

* Distribute GVR labels into 'group', 'version', and 'resource' to avoid exceeding character limits

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>

---------

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>
Co-authored-by: Kamaal <kamaal@macs-MacBook-Air.local>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-12-16 10:36:34 +05:30
..
chainsaw-test.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
crd-definition.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
crd-permission.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
ephemeral-report.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
policy.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
README.md distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30
resource.yaml distributed labels in group, version, and resource so it doesn't exceed (#11620) 2024-12-16 10:36:34 +05:30

Description

This test ensures that the EphemeralReport is generated successfully at admission, even when long GVR (Group, Version, Resource) labels are used. Kyverno handles this by distributing the GVR components (group, version, resource) into separate labels, ensuring they fit within Kubernetes' 63-character limit.

Kubernetes enforces the 63-character label limit during resource creation, and Kyverno ensures that the GVR components are split appropriately into distinct labels to avoid exceeding this limit.

Why It's Important

If the combined length of GVR identifiers exceeds the 63-character limit, Kubernetes won't create the EphemeralReport at admission. Kyverno addresses this by: Splitting the GVR components into separate labels, ensuring no label exceeds the size limit. This approach enables the successful creation of EphemeralReport at admission.

Expected Behavior

  • Kyverno splits the GVR components (group, version, resource) into separate labels.
  • The creation of EphemeralReport at admission will proceed successfully with the labels preserved within size limits.

Reference Issue(s)

  • Kyverno Issue #11547