1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 10:04:25 +00:00

fix imageVerify rule conversion ()

This commit is contained in:
Jim Bugwadia 2022-04-11 19:03:34 -07:00 committed by GitHub
parent 0f186afb3e
commit f11cec73a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 34 deletions

View file

@ -16,13 +16,14 @@ type ImageVerification struct {
// Image is the image name consisting of the registry address, repository, image, and tag.
// Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.
// Deprecated. Use ImageReferences instead.
// +kubebuilder:validation:Optional
Image string `json:"image,omitempty" yaml:"image,omitempty"`
// ImageReferences is a list of matching image reference patterns. At least one pattern in the
// list must match the image for the rule to apply. Each image reference consists of a registry
// address (defaults to docker.io), repository, image, and tag (defaults to latest).
// Wildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.
// +kubebuilder:default:={"*"}
// +kubebuilder:validation:Optional
ImageReferences []string `json:"imageReferences,omitempty" yaml:"imageReferences,omitempty"`
// Key is the PEM encoded public key that the image or attestation is signed with.
@ -270,7 +271,7 @@ func (iv *ImageVerification) Convert() *ImageVerification {
return iv
}
copy := &ImageVerification{}
copy := iv.DeepCopy()
copy.Attestations = iv.Attestations
if iv.Image != "" {

View file

@ -1358,8 +1358,6 @@ spec:
description: 'Image is the image name consisting of the registry address, repository, image, and tag. Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.'
items:
type: string
@ -2776,8 +2774,6 @@ spec:
description: 'Image is the image name consisting of the registry address, repository, image, and tag. Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.'
items:
type: string
@ -4903,8 +4899,6 @@ spec:
description: 'Image is the image name consisting of the registry address, repository, image, and tag. Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.'
items:
type: string
@ -6321,8 +6315,6 @@ spec:
description: 'Image is the image name consisting of the registry address, repository, image, and tag. Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image reference patterns. At least one pattern in the list must match the image for the rule to apply. Each image reference consists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest). Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.'
items:
type: string

View file

@ -2172,8 +2172,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -4455,8 +4453,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image

View file

@ -2173,8 +2173,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -4457,8 +4455,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image

View file

@ -2188,8 +2188,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -4471,8 +4469,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -7641,8 +7637,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -9925,8 +9919,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image

View file

@ -2177,8 +2177,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -4460,8 +4458,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -7606,8 +7602,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image
@ -9890,8 +9884,6 @@ spec:
Deprecated. Use ImageReferences instead.'
type: string
imageReferences:
default:
- '*'
description: 'ImageReferences is a list of matching image
reference patterns. At least one pattern in the list
must match the image for the rule to apply. Each image