From 1786cb8bc89c038dc69b75058e68e73ca0219618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Thu, 2 Jun 2022 21:05:23 +0200 Subject: [PATCH] fix: bool fields in image verification types (#4053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: add policy event listener in ur controller (#4012) Signed-off-by: Charles-Edouard Brétéché (cherry picked from commit cd1fa030eefb33e45c10700c9d581a94d7c99db3) Signed-off-by: Charles-Edouard Brétéché * fix: bool fields in image verification types Signed-off-by: Charles-Edouard Brétéché --- api/kyverno/v1/image_verification_types.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/kyverno/v1/image_verification_types.go b/api/kyverno/v1/image_verification_types.go index 531178eb7e..a5cf2d0e66 100644 --- a/api/kyverno/v1/image_verification_types.go +++ b/api/kyverno/v1/image_verification_types.go @@ -68,18 +68,18 @@ type ImageVerification struct { // MutateDigest enables replacement of image tags with digests. // Defaults to true. // +kubebuilder:default=true - // +kubebuilder:validation:Required - MutateDigest bool `json:"mutateDigest,omitempty" yaml:"mutateDigest,omitempty"` + // +kubebuilder:validation:Optional + MutateDigest bool `json:"mutateDigest" yaml:"mutateDigest"` // VerifyDigest validates that images have a digest. // +kubebuilder:default=true - // +kubebuilder:validation:Required - VerifyDigest bool `json:"verifyDigest,omitempty" yaml:"verifyDigest,omitempty"` + // +kubebuilder:validation:Optional + VerifyDigest bool `json:"verifyDigest" yaml:"verifyDigest"` // Required validates that images are verified i.e. have matched passed a signature or attestation check. // +kubebuilder:default=true - // +kubebuilder:validation:Required - Required bool `json:"required,omitempty" yaml:"required,omitempty"` + // +kubebuilder:validation:Optional + Required bool `json:"required" yaml:"required"` } type AttestorSet struct {