Fix list_type_missing in api/imagepolicy

This commit is contained in:
Tim Hockin 2023-11-16 11:45:16 -08:00
parent cddfa43769
commit 7fc3ef1fec
No known key found for this signature in database
4 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,3 @@
API rule violation: list_type_missing,k8s.io/api/imagepolicy/v1alpha1,ImageReviewSpec,Containers
API rule violation: list_type_missing,k8s.io/api/networking/v1,IPBlock,Except
API rule violation: list_type_missing,k8s.io/api/networking/v1,IngressLoadBalancerStatus,Ingress
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicyEgressRule,Ports

View File

@ -37939,6 +37939,11 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceC
Type: []string{"object"},
Properties: map[string]spec.Schema{
"containers": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "Containers is a list of a subset of the information in each container of the Pod being created.",
Type: []string{"array"},

View File

@ -54,6 +54,7 @@ message ImageReviewContainerSpec {
message ImageReviewSpec {
// Containers is a list of a subset of the information in each container of the Pod being created.
// +optional
// +listType=atomic
repeated ImageReviewContainerSpec containers = 1;
// Annotations is a list of key-value pairs extracted from the Pod's annotations.

View File

@ -45,6 +45,7 @@ type ImageReview struct {
type ImageReviewSpec struct {
// Containers is a list of a subset of the information in each container of the Pod being created.
// +optional
// +listType=atomic
Containers []ImageReviewContainerSpec `json:"containers,omitempty" protobuf:"bytes,1,rep,name=containers"`
// Annotations is a list of key-value pairs extracted from the Pod's annotations.
// It only includes keys which match the pattern `*.image-policy.k8s.io/*`.