mark persistentvolume's claimRef as granular

This commit is contained in:
Alexander Zielenski
2022-08-03 09:48:30 -07:00
parent 133c265530
commit 84f795d04a
7 changed files with 14 additions and 3 deletions

View File

@@ -7324,7 +7324,8 @@
}, },
"claimRef": { "claimRef": {
"$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference", "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference",
"description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding" "description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
"x-kubernetes-map-type": "granular"
}, },
"csi": { "csi": {
"$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource", "$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource",

View File

@@ -4341,7 +4341,8 @@
"$ref": "#/components/schemas/io.k8s.api.core.v1.ObjectReference" "$ref": "#/components/schemas/io.k8s.api.core.v1.ObjectReference"
} }
], ],
"description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding" "description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
"x-kubernetes-map-type": "granular"
}, },
"csi": { "csi": {
"allOf": [ "allOf": [

View File

@@ -693,7 +693,8 @@
"$ref": "#/components/schemas/io.k8s.api.core.v1.ObjectReference" "$ref": "#/components/schemas/io.k8s.api.core.v1.ObjectReference"
} }
], ],
"description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding" "description": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
"x-kubernetes-map-type": "granular"
}, },
"csi": { "csi": {
"allOf": [ "allOf": [

View File

@@ -20823,6 +20823,11 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback)
}, },
}, },
"claimRef": { "claimRef": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "granular",
},
},
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", Description: "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
Ref: ref("k8s.io/api/core/v1.ObjectReference"), Ref: ref("k8s.io/api/core/v1.ObjectReference"),

View File

@@ -2951,6 +2951,7 @@ message PersistentVolumeSpec {
// claim.VolumeName is the authoritative bind between PV and PVC. // claim.VolumeName is the authoritative bind between PV and PVC.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
// +optional // +optional
// +structType=granular
optional ObjectReference claimRef = 4; optional ObjectReference claimRef = 4;
// persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. // persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim.

View File

@@ -337,6 +337,7 @@ type PersistentVolumeSpec struct {
// claim.VolumeName is the authoritative bind between PV and PVC. // claim.VolumeName is the authoritative bind between PV and PVC.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
// +optional // +optional
// +structType=granular
ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"` ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"`
// persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. // persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim.
// Valid options are Retain (default for manually created PersistentVolumes), Delete (default // Valid options are Retain (default for manually created PersistentVolumes), Delete (default

View File

@@ -5433,6 +5433,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: claimRef - name: claimRef
type: type:
namedType: io.k8s.api.core.v1.ObjectReference namedType: io.k8s.api.core.v1.ObjectReference
elementRelationship: separable
- name: csi - name: csi
type: type:
namedType: io.k8s.api.core.v1.CSIPersistentVolumeSource namedType: io.k8s.api.core.v1.CSIPersistentVolumeSource