Merge pull request #40013 from jsafrane/storage-ga-class-attributes

Automatic merge from submit-queue

Add ClassName attributes to PV and PVC

This just adds new attributes to PV/PVC. Real code that uses the attributes instead of beta annotations will follow when we agree on the attribute names / style.
This commit is contained in:
Kubernetes Submit Queue 2017-02-23 06:39:41 -08:00 committed by GitHub
commit bb7cc74069
16 changed files with 1091 additions and 777 deletions

View File

@ -37674,6 +37674,10 @@
"description": "A label query over volumes to consider for binding.", "description": "A label query over volumes to consider for binding.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
}, },
"storageClassName": {
"description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1",
"type": "string"
},
"volumeName": { "volumeName": {
"description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"type": "string" "type": "string"
@ -37842,6 +37846,10 @@
"description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.RBDVolumeSource" "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.RBDVolumeSource"
}, },
"storageClassName": {
"description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
"type": "string"
},
"vsphereVolume": { "vsphereVolume": {
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.VsphereVirtualDiskVolumeSource" "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.VsphereVirtualDiskVolumeSource"

View File

@ -3081,6 +3081,10 @@
"volumeName": { "volumeName": {
"type": "string", "type": "string",
"description": "VolumeName is the binding reference to the PersistentVolume backing this claim." "description": "VolumeName is the binding reference to the PersistentVolume backing this claim."
},
"storageClassName": {
"type": "string",
"description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1"
} }
} }
}, },

View File

@ -17667,6 +17667,10 @@
"volumeName": { "volumeName": {
"type": "string", "type": "string",
"description": "VolumeName is the binding reference to the PersistentVolume backing this claim." "description": "VolumeName is the binding reference to the PersistentVolume backing this claim."
},
"storageClassName": {
"type": "string",
"description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1"
} }
} }
}, },
@ -17895,6 +17899,10 @@
"persistentVolumeReclaimPolicy": { "persistentVolumeReclaimPolicy": {
"type": "string", "type": "string",
"description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy" "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy"
},
"storageClassName": {
"type": "string",
"description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass."
} }
} }
}, },

View File

@ -1053,6 +1053,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">storageClassName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the StorageClass required by the claim. More info: <a href="http://kubernetes.io/docs/user-guide/persistent-volumes#class-1">http://kubernetes.io/docs/user-guide/persistent-volumes#class-1</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -1074,6 +1074,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">storageClassName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the StorageClass required by the claim. More info: <a href="http://kubernetes.io/docs/user-guide/persistent-volumes#class-1">http://kubernetes.io/docs/user-guide/persistent-volumes#class-1</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
@ -7030,6 +7037,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">storageClassName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -404,6 +404,10 @@ type PersistentVolumeSpec struct {
// Optional: what happens to a persistent volume when released from its claim. // Optional: what happens to a persistent volume when released from its claim.
// +optional // +optional
PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy
// Name of StorageClass to which this persistent volume belongs. Empty value
// means that this volume does not belong to any StorageClass.
// +optional
StorageClassName string
} }
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes
@ -481,6 +485,10 @@ type PersistentVolumeClaimSpec struct {
// claim. When set to non-empty value Selector is not evaluated // claim. When set to non-empty value Selector is not evaluated
// +optional // +optional
VolumeName string VolumeName string
// Name of the StorageClass required by the claim.
// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1
// +optional
StorageClassName *string
} }
type PersistentVolumeClaimStatus struct { type PersistentVolumeClaimStatus struct {

File diff suppressed because it is too large Load Diff

View File

@ -1993,6 +1993,11 @@ message PersistentVolumeClaimSpec {
// VolumeName is the binding reference to the PersistentVolume backing this claim. // VolumeName is the binding reference to the PersistentVolume backing this claim.
// +optional // +optional
optional string volumeName = 3; optional string volumeName = 3;
// Name of the StorageClass required by the claim.
// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1
// +optional
optional string storageClassName = 5;
} }
// PersistentVolumeClaimStatus is the current status of a persistent volume claim. // PersistentVolumeClaimStatus is the current status of a persistent volume claim.
@ -2153,6 +2158,11 @@ message PersistentVolumeSpec {
// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy
// +optional // +optional
optional string persistentVolumeReclaimPolicy = 5; optional string persistentVolumeReclaimPolicy = 5;
// Name of StorageClass to which this persistent volume belongs. Empty value
// means that this volume does not belong to any StorageClass.
// +optional
optional string storageClassName = 6;
} }
// PersistentVolumeStatus is the current status of a persistent volume. // PersistentVolumeStatus is the current status of a persistent volume.

View File

@ -6383,7 +6383,7 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [21]bool var yyq2 [22]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = len(x.Capacity) != 0 yyq2[0] = len(x.Capacity) != 0
@ -6407,9 +6407,10 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[18] = len(x.AccessModes) != 0 yyq2[18] = len(x.AccessModes) != 0
yyq2[19] = x.ClaimRef != nil yyq2[19] = x.ClaimRef != nil
yyq2[20] = x.PersistentVolumeReclaimPolicy != "" yyq2[20] = x.PersistentVolumeReclaimPolicy != ""
yyq2[21] = x.StorageClassName != ""
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(21) r.EncodeArrayStart(22)
} else { } else {
yynn2 = 0 yynn2 = 0
for _, b := range yyq2 { for _, b := range yyq2 {
@ -7143,6 +7144,31 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e) x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[21] {
yym67 := z.EncBinary()
_ = yym67
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[21] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym68 := z.EncBinary()
_ = yym68
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
}
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -7479,6 +7505,18 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode
yyv25 := &x.PersistentVolumeReclaimPolicy yyv25 := &x.PersistentVolumeReclaimPolicy
yyv25.CodecDecodeSelf(d) yyv25.CodecDecodeSelf(d)
} }
case "storageClassName":
if r.TryDecodeAsNil() {
x.StorageClassName = ""
} else {
yyv26 := &x.StorageClassName
yym27 := z.DecBinary()
_ = yym27
if false {
} else {
*((*string)(yyv26)) = r.DecodeString()
}
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -7490,16 +7528,16 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj26 int var yyj28 int
var yyb26 bool var yyb28 bool
var yyhl26 bool = l >= 0 var yyhl28 bool = l >= 0
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7507,19 +7545,19 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Capacity = nil x.Capacity = nil
} else { } else {
yyv27 := &x.Capacity yyv29 := &x.Capacity
yyv27.CodecDecodeSelf(d) yyv29.CodecDecodeSelf(d)
} }
if x.PersistentVolumeSource.GCEPersistentDisk == nil { if x.PersistentVolumeSource.GCEPersistentDisk == nil {
x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource) x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7537,13 +7575,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.AWSElasticBlockStore == nil { if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource) x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7561,13 +7599,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.HostPath == nil { if x.PersistentVolumeSource.HostPath == nil {
x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource) x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7585,13 +7623,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.Glusterfs == nil { if x.PersistentVolumeSource.Glusterfs == nil {
x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource) x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7609,13 +7647,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.NFS == nil { if x.PersistentVolumeSource.NFS == nil {
x.PersistentVolumeSource.NFS = new(NFSVolumeSource) x.PersistentVolumeSource.NFS = new(NFSVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7633,13 +7671,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.RBD == nil { if x.PersistentVolumeSource.RBD == nil {
x.PersistentVolumeSource.RBD = new(RBDVolumeSource) x.PersistentVolumeSource.RBD = new(RBDVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7657,13 +7695,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.ISCSI == nil { if x.PersistentVolumeSource.ISCSI == nil {
x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource) x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7681,13 +7719,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.Cinder == nil { if x.PersistentVolumeSource.Cinder == nil {
x.PersistentVolumeSource.Cinder = new(CinderVolumeSource) x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7705,13 +7743,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.CephFS == nil { if x.PersistentVolumeSource.CephFS == nil {
x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource) x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7729,13 +7767,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.FC == nil { if x.PersistentVolumeSource.FC == nil {
x.PersistentVolumeSource.FC = new(FCVolumeSource) x.PersistentVolumeSource.FC = new(FCVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7753,13 +7791,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.Flocker == nil { if x.PersistentVolumeSource.Flocker == nil {
x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource) x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7777,13 +7815,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.FlexVolume == nil { if x.PersistentVolumeSource.FlexVolume == nil {
x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource) x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7801,13 +7839,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.AzureFile == nil { if x.PersistentVolumeSource.AzureFile == nil {
x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource) x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7825,13 +7863,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.VsphereVolume == nil { if x.PersistentVolumeSource.VsphereVolume == nil {
x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource) x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7849,13 +7887,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.Quobyte == nil { if x.PersistentVolumeSource.Quobyte == nil {
x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource) x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7873,13 +7911,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.AzureDisk == nil { if x.PersistentVolumeSource.AzureDisk == nil {
x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource) x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7897,13 +7935,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if x.PersistentVolumeSource.PhotonPersistentDisk == nil { if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7918,13 +7956,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
} }
x.PhotonPersistentDisk.CodecDecodeSelf(d) x.PhotonPersistentDisk.CodecDecodeSelf(d)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7932,21 +7970,21 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.AccessModes = nil x.AccessModes = nil
} else { } else {
yyv45 := &x.AccessModes yyv47 := &x.AccessModes
yym46 := z.DecBinary() yym48 := z.DecBinary()
_ = yym46 _ = yym48
if false { if false {
} else { } else {
h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv45), d) h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv47), d)
} }
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7961,13 +7999,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
} }
x.ClaimRef.CodecDecodeSelf(d) x.ClaimRef.CodecDecodeSelf(d)
} }
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -7975,21 +8013,43 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.PersistentVolumeReclaimPolicy = "" x.PersistentVolumeReclaimPolicy = ""
} else { } else {
yyv48 := &x.PersistentVolumeReclaimPolicy yyv50 := &x.PersistentVolumeReclaimPolicy
yyv48.CodecDecodeSelf(d) yyv50.CodecDecodeSelf(d)
}
yyj28++
if yyhl28 {
yyb28 = yyj28 > l
} else {
yyb28 = r.CheckBreak()
}
if yyb28 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StorageClassName = ""
} else {
yyv51 := &x.StorageClassName
yym52 := z.DecBinary()
_ = yym52
if false {
} else {
*((*string)(yyv51)) = r.DecodeString()
}
} }
for { for {
yyj26++ yyj28++
if yyhl26 { if yyhl28 {
yyb26 = yyj26 > l yyb28 = yyj28 > l
} else { } else {
yyb26 = r.CheckBreak() yyb28 = r.CheckBreak()
} }
if yyb26 { if yyb28 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj26-1, "") z.DecStructFieldNotFound(yyj28-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -9442,16 +9502,17 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [4]bool var yyq2 [5]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = len(x.AccessModes) != 0 yyq2[0] = len(x.AccessModes) != 0
yyq2[1] = x.Selector != nil yyq2[1] = x.Selector != nil
yyq2[2] = true yyq2[2] = true
yyq2[3] = x.VolumeName != "" yyq2[3] = x.VolumeName != ""
yyq2[4] = x.StorageClassName != nil
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(4) r.EncodeArrayStart(5)
} else { } else {
yynn2 = 0 yynn2 = 0
for _, b := range yyq2 { for _, b := range yyq2 {
@ -9572,6 +9633,41 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} }
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[4] {
if x.StorageClassName == nil {
r.EncodeNil()
} else {
yy18 := *x.StorageClassName
yym19 := z.EncBinary()
_ = yym19
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yy18))
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.StorageClassName == nil {
r.EncodeNil()
} else {
yy20 := *x.StorageClassName
yym21 := z.EncBinary()
_ = yym21
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yy20))
}
}
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -9681,6 +9777,22 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.D
*((*string)(yyv9)) = r.DecodeString() *((*string)(yyv9)) = r.DecodeString()
} }
} }
case "storageClassName":
if r.TryDecodeAsNil() {
if x.StorageClassName != nil {
x.StorageClassName = nil
}
} else {
if x.StorageClassName == nil {
x.StorageClassName = new(string)
}
yym12 := z.DecBinary()
_ = yym12
if false {
} else {
*((*string)(x.StorageClassName)) = r.DecodeString()
}
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -9692,16 +9804,16 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj11 int var yyj13 int
var yyb11 bool var yyb13 bool
var yyhl11 bool = l >= 0 var yyhl13 bool = l >= 0
yyj11++ yyj13++
if yyhl11 { if yyhl13 {
yyb11 = yyj11 > l yyb13 = yyj13 > l
} else { } else {
yyb11 = r.CheckBreak() yyb13 = r.CheckBreak()
} }
if yyb11 { if yyb13 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -9709,21 +9821,21 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.AccessModes = nil x.AccessModes = nil
} else { } else {
yyv12 := &x.AccessModes yyv14 := &x.AccessModes
yym13 := z.DecBinary() yym15 := z.DecBinary()
_ = yym13 _ = yym15
if false { if false {
} else { } else {
h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv12), d) h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv14), d)
} }
} }
yyj11++ yyj13++
if yyhl11 { if yyhl13 {
yyb11 = yyj11 > l yyb13 = yyj13 > l
} else { } else {
yyb11 = r.CheckBreak() yyb13 = r.CheckBreak()
} }
if yyb11 { if yyb13 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -9736,21 +9848,21 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978
if x.Selector == nil { if x.Selector == nil {
x.Selector = new(pkg2_v1.LabelSelector) x.Selector = new(pkg2_v1.LabelSelector)
} }
yym15 := z.DecBinary() yym17 := z.DecBinary()
_ = yym15 _ = yym17
if false { if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) { } else if z.HasExtensions() && z.DecExt(x.Selector) {
} else { } else {
z.DecFallback(x.Selector, false) z.DecFallback(x.Selector, false)
} }
} }
yyj11++ yyj13++
if yyhl11 { if yyhl13 {
yyb11 = yyj11 > l yyb13 = yyj13 > l
} else { } else {
yyb11 = r.CheckBreak() yyb13 = r.CheckBreak()
} }
if yyb11 { if yyb13 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -9758,16 +9870,16 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Resources = ResourceRequirements{} x.Resources = ResourceRequirements{}
} else { } else {
yyv16 := &x.Resources yyv18 := &x.Resources
yyv16.CodecDecodeSelf(d) yyv18.CodecDecodeSelf(d)
} }
yyj11++ yyj13++
if yyhl11 { if yyhl13 {
yyb11 = yyj11 > l yyb13 = yyj13 > l
} else { } else {
yyb11 = r.CheckBreak() yyb13 = r.CheckBreak()
} }
if yyb11 { if yyb13 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -9775,26 +9887,52 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.VolumeName = "" x.VolumeName = ""
} else { } else {
yyv17 := &x.VolumeName yyv19 := &x.VolumeName
yym18 := z.DecBinary() yym20 := z.DecBinary()
_ = yym18 _ = yym20
if false { if false {
} else { } else {
*((*string)(yyv17)) = r.DecodeString() *((*string)(yyv19)) = r.DecodeString()
}
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.StorageClassName != nil {
x.StorageClassName = nil
}
} else {
if x.StorageClassName == nil {
x.StorageClassName = new(string)
}
yym22 := z.DecBinary()
_ = yym22
if false {
} else {
*((*string)(x.StorageClassName)) = r.DecodeString()
} }
} }
for { for {
yyj11++ yyj13++
if yyhl11 { if yyhl13 {
yyb11 = yyj11 > l yyb13 = yyj13 > l
} else { } else {
yyb11 = r.CheckBreak() yyb13 = r.CheckBreak()
} }
if yyb11 { if yyb13 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj11-1, "") z.DecStructFieldNotFound(yyj13-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -65283,7 +65421,7 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 496) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 512)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]
@ -65402,7 +65540,7 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -466,6 +466,10 @@ type PersistentVolumeSpec struct {
// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy
// +optional // +optional
PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"` PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"`
// Name of StorageClass to which this persistent volume belongs. Empty value
// means that this volume does not belong to any StorageClass.
// +optional
StorageClassName string `json:"storageClassName,omitempty"`
} }
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
@ -561,6 +565,10 @@ type PersistentVolumeClaimSpec struct {
// VolumeName is the binding reference to the PersistentVolume backing this claim. // VolumeName is the binding reference to the PersistentVolume backing this claim.
// +optional // +optional
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"` VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
// Name of the StorageClass required by the claim.
// More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1
// +optional
StorageClassName *string `json:"storageClassName,omitempty"`
} }
// PersistentVolumeClaimStatus is the current status of a persistent volume claim. // PersistentVolumeClaimStatus is the current status of a persistent volume claim.

View File

@ -1060,11 +1060,12 @@ func (PersistentVolumeClaimList) SwaggerDoc() map[string]string {
} }
var map_PersistentVolumeClaimSpec = map[string]string{ var map_PersistentVolumeClaimSpec = map[string]string{
"": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", "": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes",
"accessModes": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", "accessModes": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1",
"selector": "A label query over volumes to consider for binding.", "selector": "A label query over volumes to consider for binding.",
"resources": "Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", "resources": "Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources",
"volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"storageClassName": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1",
} }
func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
@ -1133,6 +1134,7 @@ var map_PersistentVolumeSpec = map[string]string{
"accessModes": "AccessModes contains all ways the volume can be mounted. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes", "accessModes": "AccessModes contains all ways the volume can be mounted. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes",
"claimRef": "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: http://kubernetes.io/docs/user-guide/persistent-volumes#binding", "claimRef": "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: http://kubernetes.io/docs/user-guide/persistent-volumes#binding",
"persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy", "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy",
"storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
} }
func (PersistentVolumeSpec) SwaggerDoc() map[string]string { func (PersistentVolumeSpec) SwaggerDoc() map[string]string {

View File

@ -2583,6 +2583,7 @@ func autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(i
return err return err
} }
out.VolumeName = in.VolumeName out.VolumeName = in.VolumeName
out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
return nil return nil
} }
@ -2597,6 +2598,7 @@ func autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(i
return err return err
} }
out.VolumeName = in.VolumeName out.VolumeName = in.VolumeName
out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
return nil return nil
} }
@ -2744,6 +2746,7 @@ func autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *Persist
out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef)) out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef))
out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
out.StorageClassName = in.StorageClassName
return nil return nil
} }
@ -2759,6 +2762,7 @@ func autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.Per
out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
out.ClaimRef = (*ObjectReference)(unsafe.Pointer(in.ClaimRef)) out.ClaimRef = (*ObjectReference)(unsafe.Pointer(in.ClaimRef))
out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
out.StorageClassName = in.StorageClassName
return nil return nil
} }

View File

@ -1856,6 +1856,11 @@ func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *c
if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
return err return err
} }
if in.StorageClassName != nil {
in, out := &in.StorageClassName, &out.StorageClassName
*out = new(string)
**out = **in
}
return nil return nil
} }
} }

View File

@ -1900,6 +1900,11 @@ func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *
if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
return err return err
} }
if in.StorageClassName != nil {
in, out := &in.StorageClassName, &out.StorageClassName
*out = new(string)
**out = **in
}
return nil return nil
} }
} }

View File

@ -1560,7 +1560,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.Persisten
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -5312,6 +5312,13 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
Format: "", Format: "",
}, },
}, },
"storageClassName": {
SchemaProps: spec.SchemaProps{
Description: "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1",
Type: []string{"string"},
Format: "",
},
},
}, },
}, },
}, },
@ -5693,6 +5700,13 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
Format: "", Format: "",
}, },
}, },
"storageClassName": {
SchemaProps: spec.SchemaProps{
Description: "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
Type: []string{"string"},
Format: "",
},
},
}, },
}, },
}, },