Fix list_type_missing in api/storage

This commit is contained in:
Tim Hockin 2023-11-16 12:19:51 -08:00
parent e96578fb4d
commit 58fb9f6e66
No known key found for this signature in database
10 changed files with 69 additions and 60 deletions

View File

@ -1,13 +1,3 @@
API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeDriver,TopologyKeys
API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeSpec,Drivers
API rule violation: list_type_missing,k8s.io/api/storage/v1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1,StorageClass,MountOptions
API rule violation: list_type_missing,k8s.io/api/storage/v1alpha1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIDriverSpec,VolumeLifecycleModes
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeDriver,TopologyKeys
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeSpec,Drivers
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,MountOptions
API rule violation: list_type_missing,k8s.io/apiserver/pkg/apis/audit/v1,Event,SourceIPs
API rule violation: list_type_missing,k8s.io/apiserver/pkg/apis/audit/v1,GroupResources,ResourceNames
API rule violation: list_type_missing,k8s.io/apiserver/pkg/apis/audit/v1,GroupResources,Resources

View File

@ -15053,7 +15053,8 @@
"items": {
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
@ -15106,6 +15107,10 @@
"$ref": "#/definitions/io.k8s.api.storage.v1.CSINodeDriver"
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge"
}
@ -15171,11 +15176,7 @@
"items": {
"$ref": "#/definitions/io.k8s.api.storage.v1.CSIStorageCapacity"
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
"type": "array"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
@ -15230,7 +15231,8 @@
"items": {
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"parameters": {
"additionalProperties": {

View File

@ -1394,7 +1394,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
@ -1462,6 +1463,10 @@
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge"
}
@ -1550,11 +1555,7 @@
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
"type": "array"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
@ -1625,7 +1626,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"parameters": {
"additionalProperties": {

View File

@ -44813,6 +44813,11 @@ func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) com
},
},
"topologyKeys": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.",
Type: []string{"array"},
@ -44903,6 +44908,10 @@ func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) commo
"drivers": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge",
},
@ -45021,14 +45030,6 @@ func schema_k8sio_api_storage_v1_CSIStorageCapacityList(ref common.ReferenceCall
},
},
"items": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "items is the list of CSIStorageCapacity objects.",
Type: []string{"array"},
@ -45112,6 +45113,11 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm
},
},
"mountOptions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.",
Type: []string{"array"},
@ -45610,14 +45616,6 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen
},
},
"items": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "items is the list of CSIStorageCapacity objects.",
Type: []string{"array"},
@ -46118,6 +46116,11 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback
},
},
"volumeLifecycleModes": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism.\n\nThe other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume.\n\nFor more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.",
Type: []string{"array"},
@ -46255,6 +46258,11 @@ func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback
},
},
"topologyKeys": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.",
Type: []string{"array"},
@ -46345,6 +46353,10 @@ func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback)
"drivers": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge",
},
@ -46463,14 +46475,6 @@ func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.Referenc
},
},
"items": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "items is the list of CSIStorageCapacity objects.",
Type: []string{"array"},
@ -46554,6 +46558,11 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback)
},
},
"mountOptions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.",
Type: []string{"array"},

View File

@ -261,6 +261,7 @@ message CSINodeDriver {
// It is possible for different nodes to use different topology keys.
// This can be empty if driver does not support topology.
// +optional
// +listType=atomic
repeated string topologyKeys = 3;
// allocatable represents the volume resources of a node that are available for scheduling.
@ -286,6 +287,8 @@ message CSINodeSpec {
// If all drivers in the list are uninstalled, this can become empty.
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
repeated CSINodeDriver drivers = 1;
}
@ -378,8 +381,6 @@ message CSIStorageCapacityList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
repeated CSIStorageCapacity items = 2;
}
@ -411,6 +412,7 @@ message StorageClass {
// e.g. ["ro", "soft"]. Not validated -
// mount of the PVs will simply fail if one is invalid.
// +optional
// +listType=atomic
repeated string mountOptions = 5;
// allowVolumeExpansion shows whether the storage class allow volume expand.

View File

@ -56,6 +56,7 @@ type StorageClass struct {
// e.g. ["ro", "soft"]. Not validated -
// mount of the PVs will simply fail if one is invalid.
// +optional
// +listType=atomic
MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"`
// allowVolumeExpansion shows whether the storage class allow volume expand.
@ -517,6 +518,8 @@ type CSINodeSpec struct {
// If all drivers in the list are uninstalled, this can become empty.
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"`
}
@ -549,6 +552,7 @@ type CSINodeDriver struct {
// It is possible for different nodes to use different topology keys.
// This can be empty if driver does not support topology.
// +optional
// +listType=atomic
TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"`
// allocatable represents the volume resources of a node that are available for scheduling.
@ -680,7 +684,5 @@ type CSIStorageCapacityList struct {
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@ -119,8 +119,6 @@ message CSIStorageCapacityList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
repeated CSIStorageCapacity items = 2;
}

View File

@ -247,8 +247,6 @@ type CSIStorageCapacityList struct {
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@ -127,6 +127,7 @@ message CSIDriverSpec {
// This field is immutable.
//
// +optional
// +listType=atomic
repeated string volumeLifecycleModes = 3;
// storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage
@ -263,6 +264,7 @@ message CSINodeDriver {
// It is possible for different nodes to use different topology keys.
// This can be empty if driver does not support topology.
// +optional
// +listType=atomic
repeated string topologyKeys = 3;
// allocatable represents the volume resources of a node that are available for scheduling.
@ -287,6 +289,8 @@ message CSINodeSpec {
// If all drivers in the list are uninstalled, this can become empty.
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
repeated CSINodeDriver drivers = 1;
}
@ -379,8 +383,6 @@ message CSIStorageCapacityList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
repeated CSIStorageCapacity items = 2;
}
@ -412,6 +414,7 @@ message StorageClass {
// e.g. ["ro", "soft"]. Not validated -
// mount of the PVs will simply fail if one is invalid.
// +optional
// +listType=atomic
repeated string mountOptions = 5;
// allowVolumeExpansion shows whether the storage class allow volume expand

View File

@ -59,6 +59,7 @@ type StorageClass struct {
// e.g. ["ro", "soft"]. Not validated -
// mount of the PVs will simply fail if one is invalid.
// +optional
// +listType=atomic
MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"`
// allowVolumeExpansion shows whether the storage class allow volume expand
@ -347,6 +348,7 @@ type CSIDriverSpec struct {
// This field is immutable.
//
// +optional
// +listType=atomic
VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"`
// storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage
@ -535,6 +537,8 @@ type CSINodeSpec struct {
// If all drivers in the list are uninstalled, this can become empty.
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"`
}
@ -567,6 +571,7 @@ type CSINodeDriver struct {
// It is possible for different nodes to use different topology keys.
// This can be empty if driver does not support topology.
// +optional
// +listType=atomic
TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"`
// allocatable represents the volume resources of a node that are available for scheduling.
@ -707,7 +712,5 @@ type CSIStorageCapacityList struct {
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// items is the list of CSIStorageCapacity objects.
// +listType=map
// +listMapKey=name
Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"`
}