Generated StorageClass.ReclaimPolicy code

This commit is contained in:
Matthew Wong 2017-06-23 15:31:21 -04:00
parent 0356a840ff
commit 396e6f6eb1
30 changed files with 567 additions and 204 deletions

View File

@ -63074,6 +63074,10 @@
"provisioner": { "provisioner": {
"description": "Provisioner indicates the type of the provisioner.", "description": "Provisioner indicates the type of the provisioner.",
"type": "string" "type": "string"
},
"reclaimPolicy": {
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
"type": "string"
} }
}, },
"x-kubernetes-group-version-kind": [ "x-kubernetes-group-version-kind": [
@ -63146,6 +63150,10 @@
"provisioner": { "provisioner": {
"description": "Provisioner indicates the type of the provisioner.", "description": "Provisioner indicates the type of the provisioner.",
"type": "string" "type": "string"
},
"reclaimPolicy": {
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
"type": "string"
} }
}, },
"x-kubernetes-group-version-kind": [ "x-kubernetes-group-version-kind": [

View File

@ -716,6 +716,10 @@
"parameters": { "parameters": {
"type": "object", "type": "object",
"description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class." "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class."
},
"reclaimPolicy": {
"$ref": "v1.PersistentVolumeReclaimPolicy",
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete."
} }
} }
}, },
@ -957,6 +961,10 @@
} }
} }
}, },
"v1.PersistentVolumeReclaimPolicy": {
"id": "v1.PersistentVolumeReclaimPolicy",
"properties": {}
},
"v1.WatchEvent": { "v1.WatchEvent": {
"id": "v1.WatchEvent", "id": "v1.WatchEvent",
"required": [ "required": [

View File

@ -716,6 +716,10 @@
"parameters": { "parameters": {
"type": "object", "type": "object",
"description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class." "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class."
},
"reclaimPolicy": {
"$ref": "v1.PersistentVolumeReclaimPolicy",
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete."
} }
} }
}, },
@ -957,6 +961,10 @@
} }
} }
}, },
"v1.PersistentVolumeReclaimPolicy": {
"id": "v1.PersistentVolumeReclaimPolicy",
"properties": {}
},
"v1.WatchEvent": { "v1.WatchEvent": {
"id": "v1.WatchEvent", "id": "v1.WatchEvent",
"required": [ "required": [

View File

@ -968,6 +968,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">object</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">reclaimPolicy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.</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"><a href="#_v1_persistentvolumereclaimpolicy">v1.PersistentVolumeReclaimPolicy</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
@ -1195,6 +1202,10 @@ When an object is created, the system will populate this list with the current s
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_persistentvolumereclaimpolicy">v1.PersistentVolumeReclaimPolicy</h3>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_apiresource">v1.APIResource</h3> <h3 id="_v1_apiresource">v1.APIResource</h3>

View File

@ -436,6 +436,12 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_patch">v1.Patch</h3>
<div class="paragraph">
<p>Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.</p>
</div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1beta1_storageclasslist">v1beta1.StorageClassList</h3> <h3 id="_v1beta1_storageclasslist">v1beta1.StorageClassList</h3>
@ -491,12 +497,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_patch">v1.Patch</h3>
<div class="paragraph">
<p>Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.</p>
</div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_deleteoptions">v1.DeleteOptions</h3> <h3 id="_v1_deleteoptions">v1.DeleteOptions</h3>
@ -930,6 +930,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">object</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">reclaimPolicy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.</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"><a href="#_v1_persistentvolumereclaimpolicy">v1.PersistentVolumeReclaimPolicy</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
@ -1195,6 +1202,10 @@ When an object is created, the system will populate this list with the current s
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_persistentvolumereclaimpolicy">v1.PersistentVolumeReclaimPolicy</h3>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_apiresource">v1.APIResource</h3> <h3 id="_v1_apiresource">v1.APIResource</h3>

View File

@ -26,6 +26,7 @@ go_library(
"//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library",
"//pkg/apis/policy/fuzzer:go_default_library", "//pkg/apis/policy/fuzzer:go_default_library",
"//pkg/apis/rbac/fuzzer:go_default_library", "//pkg/apis/rbac/fuzzer:go_default_library",
"//pkg/apis/storage/fuzzer:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library",

View File

@ -14,6 +14,7 @@ go_library(
"zz_generated.deepcopy.go", "zz_generated.deepcopy.go",
], ],
deps = [ deps = [
"//pkg/api:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@ -8,7 +8,12 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["fuzzer.go"], srcs = ["fuzzer.go"],
deps = ["//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library"], deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
],
) )
filegroup( filegroup(

View File

@ -8,13 +8,16 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = [ srcs = [
"defaults.go",
"doc.go", "doc.go",
"register.go", "register.go",
"zz_generated.conversion.go", "zz_generated.conversion.go",
"zz_generated.defaults.go", "zz_generated.defaults.go",
], ],
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/storage/v1:go_default_library", "//vendor/k8s.io/api/storage/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@ -21,9 +21,11 @@ limitations under the License.
package v1 package v1
import ( import (
core_v1 "k8s.io/api/core/v1"
v1 "k8s.io/api/storage/v1" v1 "k8s.io/api/storage/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api"
storage "k8s.io/kubernetes/pkg/apis/storage" storage "k8s.io/kubernetes/pkg/apis/storage"
unsafe "unsafe" unsafe "unsafe"
) )
@ -47,6 +49,7 @@ func autoConvert_v1_StorageClass_To_storage_StorageClass(in *v1.StorageClass, ou
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
out.Provisioner = in.Provisioner out.Provisioner = in.Provisioner
out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
out.ReclaimPolicy = (*api.PersistentVolumeReclaimPolicy)(unsafe.Pointer(in.ReclaimPolicy))
return nil return nil
} }
@ -59,6 +62,7 @@ func autoConvert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClas
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
out.Provisioner = in.Provisioner out.Provisioner = in.Provisioner
out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
out.ReclaimPolicy = (*core_v1.PersistentVolumeReclaimPolicy)(unsafe.Pointer(in.ReclaimPolicy))
return nil return nil
} }

View File

@ -21,6 +21,7 @@ limitations under the License.
package v1 package v1
import ( import (
v1 "k8s.io/api/storage/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -28,5 +29,18 @@ import (
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters. // All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error { func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v1.StorageClass{}, func(obj interface{}) { SetObjectDefaults_StorageClass(obj.(*v1.StorageClass)) })
scheme.AddTypeDefaultingFunc(&v1.StorageClassList{}, func(obj interface{}) { SetObjectDefaults_StorageClassList(obj.(*v1.StorageClassList)) })
return nil return nil
} }
func SetObjectDefaults_StorageClass(in *v1.StorageClass) {
SetDefaults_StorageClass(in)
}
func SetObjectDefaults_StorageClassList(in *v1.StorageClassList) {
for i := range in.Items {
a := &in.Items[i]
SetObjectDefaults_StorageClass(a)
}
}

View File

@ -8,13 +8,16 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = [ srcs = [
"defaults.go",
"doc.go", "doc.go",
"register.go", "register.go",
"zz_generated.conversion.go", "zz_generated.conversion.go",
"zz_generated.defaults.go", "zz_generated.defaults.go",
], ],
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/storage/v1beta1:go_default_library", "//vendor/k8s.io/api/storage/v1beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@ -21,9 +21,11 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
v1 "k8s.io/api/core/v1"
v1beta1 "k8s.io/api/storage/v1beta1" v1beta1 "k8s.io/api/storage/v1beta1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api"
storage "k8s.io/kubernetes/pkg/apis/storage" storage "k8s.io/kubernetes/pkg/apis/storage"
unsafe "unsafe" unsafe "unsafe"
) )
@ -47,6 +49,7 @@ func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *v1beta1.Storag
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
out.Provisioner = in.Provisioner out.Provisioner = in.Provisioner
out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
out.ReclaimPolicy = (*api.PersistentVolumeReclaimPolicy)(unsafe.Pointer(in.ReclaimPolicy))
return nil return nil
} }
@ -59,6 +62,7 @@ func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.Storag
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
out.Provisioner = in.Provisioner out.Provisioner = in.Provisioner
out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
out.ReclaimPolicy = (*v1.PersistentVolumeReclaimPolicy)(unsafe.Pointer(in.ReclaimPolicy))
return nil return nil
} }

View File

@ -21,6 +21,7 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
v1beta1 "k8s.io/api/storage/v1beta1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -28,5 +29,18 @@ import (
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters. // All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error { func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v1beta1.StorageClass{}, func(obj interface{}) { SetObjectDefaults_StorageClass(obj.(*v1beta1.StorageClass)) })
scheme.AddTypeDefaultingFunc(&v1beta1.StorageClassList{}, func(obj interface{}) { SetObjectDefaults_StorageClassList(obj.(*v1beta1.StorageClassList)) })
return nil return nil
} }
func SetObjectDefaults_StorageClass(in *v1beta1.StorageClass) {
SetDefaults_StorageClass(in)
}
func SetObjectDefaults_StorageClassList(in *v1beta1.StorageClassList) {
for i := range in.Items {
a := &in.Items[i]
SetObjectDefaults_StorageClass(a)
}
}

View File

@ -10,8 +10,10 @@ go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["validation.go"], srcs = ["validation.go"],
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/api/validation:go_default_library", "//pkg/api/validation:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
], ],
@ -22,6 +24,7 @@ go_test(
srcs = ["validation_test.go"], srcs = ["validation_test.go"],
library = ":go_default_library", library = ":go_default_library",
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
], ],

View File

@ -23,6 +23,7 @@ package storage
import ( import (
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api"
reflect "reflect" reflect "reflect"
) )
@ -59,6 +60,15 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) {
(*out)[key] = val (*out)[key] = val
} }
} }
if in.ReclaimPolicy != nil {
in, out := &in.ReclaimPolicy, &out.ReclaimPolicy
if *in == nil {
*out = nil
} else {
*out = new(api.PersistentVolumeReclaimPolicy)
**out = **in
}
}
return return
} }

View File

@ -28,6 +28,7 @@ go_test(
srcs = ["strategy_test.go"], srcs = ["strategy_test.go"],
library = ":go_default_library", library = ":go_default_library",
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",

View File

@ -11,6 +11,7 @@ go_test(
srcs = ["storage_test.go"], srcs = ["storage_test.go"],
library = ":go_default_library", library = ":go_default_library",
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/apis/storage:go_default_library", "//pkg/apis/storage:go_default_library",
"//pkg/registry/registrytest:go_default_library", "//pkg/registry/registrytest:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",

View File

@ -20,6 +20,7 @@ go_library(
"//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/github.com/ugorji/go/codec:go_default_library", "//vendor/github.com/ugorji/go/codec:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@ -34,6 +34,8 @@ import proto "github.com/gogo/protobuf/proto"
import fmt "fmt" import fmt "fmt"
import math "math" import math "math"
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import strings "strings" import strings "strings"
@ -113,6 +115,12 @@ func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v) i += copy(dAtA[i:], v)
} }
} }
if m.ReclaimPolicy != nil {
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReclaimPolicy)))
i += copy(dAtA[i:], *m.ReclaimPolicy)
}
return i, nil return i, nil
} }
@ -196,6 +204,10 @@ func (m *StorageClass) Size() (n int) {
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
} }
} }
if m.ReclaimPolicy != nil {
l = len(*m.ReclaimPolicy)
n += 1 + l + sovGenerated(uint64(l))
}
return n return n
} }
@ -244,6 +256,7 @@ func (this *StorageClass) String() string {
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
`Parameters:` + mapStringForParameters + `,`, `Parameters:` + mapStringForParameters + `,`,
`ReclaimPolicy:` + valueToStringGenerated(this.ReclaimPolicy) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -471,6 +484,36 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error {
m.Parameters[mapkey] = mapvalue m.Parameters[mapkey] = mapvalue
} }
iNdEx = postIndex iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
m.ReclaimPolicy = &s
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -713,35 +756,39 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 465 bytes of a gzipped FileDescriptorProto // 529 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x8a, 0x13, 0x41,
0x10, 0xc6, 0xb3, 0x8e, 0x22, 0xb5, 0x1b, 0x10, 0x91, 0x01, 0x29, 0xca, 0x61, 0x1b, 0x95, 0x4b, 0x10, 0xce, 0x24, 0x2e, 0xec, 0x76, 0x0c, 0x86, 0x51, 0x21, 0xe4, 0x30, 0x09, 0xeb, 0x25, 0x08,
0x2e, 0xec, 0x92, 0x16, 0x50, 0x85, 0x04, 0x87, 0x20, 0x24, 0x90, 0x40, 0x54, 0xe6, 0x86, 0x38, 0x76, 0x6f, 0x76, 0x55, 0x16, 0x41, 0x0f, 0x91, 0x05, 0x05, 0xc5, 0x30, 0x82, 0x07, 0xf1, 0x60,
0xb0, 0x49, 0x06, 0x67, 0x71, 0xec, 0xb5, 0x76, 0xc7, 0x96, 0x72, 0xe3, 0x11, 0x78, 0x1e, 0x9e, 0x67, 0x52, 0x4e, 0xda, 0xf9, 0xe9, 0xa1, 0xbb, 0x66, 0x20, 0x37, 0x1f, 0xc1, 0xe7, 0x11, 0x1f,
0x20, 0x37, 0x7a, 0xec, 0xa9, 0x22, 0xe6, 0x45, 0x90, 0xff, 0x10, 0x5b, 0x4d, 0xab, 0xf6, 0xe6, 0x20, 0xc7, 0x3d, 0xee, 0x29, 0x98, 0xf1, 0x2d, 0x3c, 0xc9, 0xcc, 0xc4, 0xcc, 0xec, 0x26, 0x8b,
0x99, 0xf9, 0x7e, 0xdf, 0xcc, 0x7e, 0xa6, 0xaf, 0x82, 0x13, 0xcb, 0x95, 0x16, 0x41, 0x32, 0x05, 0x7b, 0xeb, 0xaa, 0xfa, 0xbe, 0xaf, 0xab, 0xea, 0x2b, 0xf2, 0xc2, 0x3b, 0xd5, 0x54, 0x48, 0xe6,
0x13, 0x01, 0x82, 0x15, 0x29, 0x44, 0x73, 0x6d, 0x44, 0x35, 0x90, 0xb1, 0x12, 0x16, 0xb5, 0x91, 0xc5, 0x13, 0x50, 0x21, 0x20, 0x68, 0x96, 0x40, 0x38, 0x95, 0x8a, 0xad, 0x0b, 0x3c, 0x12, 0x4c,
0x3e, 0x88, 0x74, 0x2c, 0x7c, 0x88, 0xc0, 0x48, 0x84, 0x39, 0x8f, 0x8d, 0x46, 0xed, 0x3e, 0x2c, 0xa3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8, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x64, 0xc7, 0x7e, 0x2c, 0x04, 0x00,
0x00, 0x00,
} }

View File

@ -21,6 +21,7 @@ syntax = 'proto2';
package k8s.io.api.storage.v1; package k8s.io.api.storage.v1;
import "k8s.io/api/storage/v1beta1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
@ -47,6 +48,11 @@ message StorageClass {
// create volumes of this storage class. // create volumes of this storage class.
// +optional // +optional
map<string, string> parameters = 3; map<string, string> parameters = 3;
// Dynamically provisioned PersistentVolumes of this storage class are
// created with this reclaimPolicy. Defaults to Delete.
// +optional
optional string reclaimPolicy = 4;
} }
// StorageClassList is a collection of storage classes. // StorageClassList is a collection of storage classes.

View File

@ -25,6 +25,7 @@ import (
"errors" "errors"
"fmt" "fmt"
codec1978 "github.com/ugorji/go/codec" codec1978 "github.com/ugorji/go/codec"
pkg3_v1 "k8s.io/api/core/v1"
pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkg2_types "k8s.io/apimachinery/pkg/types" pkg2_types "k8s.io/apimachinery/pkg/types"
"reflect" "reflect"
@ -62,10 +63,11 @@ func init() {
panic(err) panic(err)
} }
if false { // reference the types, but skip this branch at build/run time if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_v1.TypeMeta var v0 pkg3_v1.PersistentVolumeReclaimPolicy
var v1 pkg2_types.UID var v1 pkg1_v1.TypeMeta
var v2 time.Time var v2 pkg2_types.UID
_, _, _ = v0, v1, v2 var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
} }
} }
@ -83,16 +85,17 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [5]bool var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = x.Kind != "" yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != "" yyq2[1] = x.APIVersion != ""
yyq2[2] = true yyq2[2] = true
yyq2[4] = len(x.Parameters) != 0 yyq2[4] = len(x.Parameters) != 0
yyq2[5] = x.ReclaimPolicy != nil
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(5) r.EncodeArrayStart(6)
} else { } else {
yynn2 = 1 yynn2 = 1
for _, b := range yyq2 { for _, b := range yyq2 {
@ -234,6 +237,33 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
} }
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
if x.ReclaimPolicy == nil {
r.EncodeNil()
} else {
yy21 := *x.ReclaimPolicy
yysf22 := &yy21
yysf22.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("reclaimPolicy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ReclaimPolicy == nil {
r.EncodeNil()
} else {
yy23 := *x.ReclaimPolicy
yysf24 := &yy23
yysf24.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -356,6 +386,17 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.F.DecMapStringStringX(yyv12, false, d) z.F.DecMapStringStringX(yyv12, false, d)
} }
} }
case "reclaimPolicy":
if r.TryDecodeAsNil() {
if x.ReclaimPolicy != nil {
x.ReclaimPolicy = nil
}
} else {
if x.ReclaimPolicy == nil {
x.ReclaimPolicy = new(pkg3_v1.PersistentVolumeReclaimPolicy)
}
x.ReclaimPolicy.CodecDecodeSelf(d)
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -367,16 +408,16 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj14 int var yyj15 int
var yyb14 bool var yyb15 bool
var yyhl14 bool = l >= 0 var yyhl15 bool = l >= 0
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -384,21 +425,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
} else { } else {
yyv15 := &x.Kind yyv16 := &x.Kind
yym16 := z.DecBinary() yym17 := z.DecBinary()
_ = yym16 _ = yym17
if false { if false {
} else { } else {
*((*string)(yyv15)) = r.DecodeString() *((*string)(yyv16)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -406,21 +447,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.APIVersion = "" x.APIVersion = ""
} else { } else {
yyv17 := &x.APIVersion yyv18 := &x.APIVersion
yym18 := z.DecBinary() yym19 := z.DecBinary()
_ = yym18 _ = yym19
if false { if false {
} else { } else {
*((*string)(yyv17)) = r.DecodeString() *((*string)(yyv18)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -428,22 +469,22 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg1_v1.ObjectMeta{} x.ObjectMeta = pkg1_v1.ObjectMeta{}
} else { } else {
yyv19 := &x.ObjectMeta yyv20 := &x.ObjectMeta
yym20 := z.DecBinary() yym21 := z.DecBinary()
_ = yym20 _ = yym21
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv19) { } else if z.HasExtensions() && z.DecExt(yyv20) {
} else { } else {
z.DecFallback(yyv19, false) z.DecFallback(yyv20, false)
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -451,21 +492,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Provisioner = "" x.Provisioner = ""
} else { } else {
yyv21 := &x.Provisioner yyv22 := &x.Provisioner
yym22 := z.DecBinary() yym23 := z.DecBinary()
_ = yym22 _ = yym23
if false { if false {
} else { } else {
*((*string)(yyv21)) = r.DecodeString() *((*string)(yyv22)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -473,26 +514,47 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Parameters = nil x.Parameters = nil
} else { } else {
yyv23 := &x.Parameters yyv24 := &x.Parameters
yym24 := z.DecBinary() yym25 := z.DecBinary()
_ = yym24 _ = yym25
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv23, false, d) z.F.DecMapStringStringX(yyv24, false, d)
} }
} }
for { yyj15++
yyj14++ if yyhl15 {
if yyhl14 { yyb15 = yyj15 > l
yyb14 = yyj14 > l } else {
} else { yyb15 = r.CheckBreak()
yyb14 = r.CheckBreak() }
if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.ReclaimPolicy != nil {
x.ReclaimPolicy = nil
} }
if yyb14 { } else {
if x.ReclaimPolicy == nil {
x.ReclaimPolicy = new(pkg3_v1.PersistentVolumeReclaimPolicy)
}
x.ReclaimPolicy.CodecDecodeSelf(d)
}
for {
yyj15++
if yyhl15 {
yyb15 = yyj15 > l
} else {
yyb15 = r.CheckBreak()
}
if yyb15 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj14-1, "") z.DecStructFieldNotFound(yyj15-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -904,7 +966,7 @@ func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.De
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 288) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -28,10 +28,11 @@ package v1
// AUTO-GENERATED FUNCTIONS START HERE // AUTO-GENERATED FUNCTIONS START HERE
var map_StorageClass = map[string]string{ var map_StorageClass = map[string]string{
"": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
"provisioner": "Provisioner indicates the type of the provisioner.", "provisioner": "Provisioner indicates the type of the provisioner.",
"parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
"reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
} }
func (StorageClass) SwaggerDoc() map[string]string { func (StorageClass) SwaggerDoc() map[string]string {

View File

@ -21,6 +21,7 @@ limitations under the License.
package v1 package v1
import ( import (
core_v1 "k8s.io/api/core/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
@ -59,6 +60,15 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) {
(*out)[key] = val (*out)[key] = val
} }
} }
if in.ReclaimPolicy != nil {
in, out := &in.ReclaimPolicy, &out.ReclaimPolicy
if *in == nil {
*out = nil
} else {
*out = new(core_v1.PersistentVolumeReclaimPolicy)
**out = **in
}
}
return return
} }

View File

@ -20,6 +20,7 @@ go_library(
"//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/github.com/ugorji/go/codec:go_default_library", "//vendor/github.com/ugorji/go/codec:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",

View File

@ -34,6 +34,8 @@ import proto "github.com/gogo/protobuf/proto"
import fmt "fmt" import fmt "fmt"
import math "math" import math "math"
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import strings "strings" import strings "strings"
@ -113,6 +115,12 @@ func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v) i += copy(dAtA[i:], v)
} }
} }
if m.ReclaimPolicy != nil {
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReclaimPolicy)))
i += copy(dAtA[i:], *m.ReclaimPolicy)
}
return i, nil return i, nil
} }
@ -196,6 +204,10 @@ func (m *StorageClass) Size() (n int) {
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
} }
} }
if m.ReclaimPolicy != nil {
l = len(*m.ReclaimPolicy)
n += 1 + l + sovGenerated(uint64(l))
}
return n return n
} }
@ -244,6 +256,7 @@ func (this *StorageClass) String() string {
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
`Parameters:` + mapStringForParameters + `,`, `Parameters:` + mapStringForParameters + `,`,
`ReclaimPolicy:` + valueToStringGenerated(this.ReclaimPolicy) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -471,6 +484,36 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error {
m.Parameters[mapkey] = mapvalue m.Parameters[mapkey] = mapvalue
} }
iNdEx = postIndex iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
m.ReclaimPolicy = &s
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -713,35 +756,38 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 468 bytes of a gzipped FileDescriptorProto // 527 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x8e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbb, 0x8e, 0x13, 0x3f,
0x10, 0xc6, 0xbd, 0x89, 0x22, 0xee, 0x36, 0x20, 0x22, 0x43, 0x11, 0xb9, 0xf0, 0x45, 0x57, 0xa5, 0x14, 0xc6, 0xe3, 0xe4, 0x1f, 0xfd, 0x77, 0x1d, 0x22, 0xa2, 0x81, 0x22, 0x4a, 0x31, 0x89, 0x52,
0xb9, 0x5d, 0x72, 0xfc, 0x51, 0x84, 0x44, 0x93, 0x13, 0x05, 0x12, 0x27, 0x4e, 0xa6, 0x43, 0x14, 0xa5, 0x59, 0x7b, 0xb3, 0x5c, 0x14, 0x21, 0xd1, 0x64, 0xb5, 0x05, 0x12, 0x2b, 0xa2, 0x41, 0xa2,
0xac, 0x93, 0xc1, 0x59, 0x1c, 0x7b, 0xad, 0xdd, 0xb1, 0xa5, 0x74, 0x3c, 0x02, 0x6f, 0x44, 0x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8b, 0x20, 0x1f, 0x98, 0x95, 0x6f, 0x5e, 0xd4, 0x27, 0x68, 0xf8, 0x0d, 0xe1, 0x4e, 0xf5,
0xbb, 0x64, 0x93, 0xbb, 0xe4, 0x3a, 0x77, 0xc9, 0x4d, 0xee, 0x92, 0xdf, 0xb9, 0x4b, 0x7e, 0xfc, 0xb1, 0xaf, 0xb9, 0xd2, 0xc6, 0x87, 0x83, 0x1c, 0xc9, 0xfd, 0x72, 0x4c, 0xe9, 0x2c, 0xc5, 0x4e,
0x71, 0xad, 0x4f, 0x0f, 0x6a, 0xc7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0xec, 0x16, 0x3f, 0x31, 0xa2, 0x93, 0x3f, 0x95, 0x4a, 0x86, 0xd7, 0xb8, 0xc9, 0x35, 0xf8, 0xaa, 0x5b, 0xcf, 0x72,
0xac, 0x03, 0x00, 0x00, 0x18, 0xdd, 0x37, 0x87, 0x69, 0xbb, 0x30, 0x6d, 0xbe, 0x4a, 0x71, 0x2b, 0x77, 0x99, 0x9e, 0xad,
0xb7, 0x66, 0xed, 0x66, 0x6b, 0xd6, 0x6e, 0xb7, 0x66, 0xed, 0x4b, 0x62, 0xa2, 0x75, 0x62, 0xa2,
0x9b, 0xc4, 0x44, 0xb7, 0x89, 0x89, 0x7e, 0x24, 0x26, 0xfa, 0xfa, 0xd3, 0xac, 0xbd, 0xff, 0xbf,
0x70, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x94, 0xc8, 0xc6, 0xb6, 0x3d, 0x04, 0x00, 0x00,
} }

View File

@ -21,6 +21,7 @@ syntax = 'proto2';
package k8s.io.api.storage.v1beta1; package k8s.io.api.storage.v1beta1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
@ -47,6 +48,11 @@ message StorageClass {
// create volumes of this storage class. // create volumes of this storage class.
// +optional // +optional
map<string, string> parameters = 3; map<string, string> parameters = 3;
// Dynamically provisioned PersistentVolumes of this storage class are
// created with this reclaimPolicy. Defaults to Delete.
// +optional
optional string reclaimPolicy = 4;
} }
// StorageClassList is a collection of storage classes. // StorageClassList is a collection of storage classes.

View File

@ -25,6 +25,7 @@ import (
"errors" "errors"
"fmt" "fmt"
codec1978 "github.com/ugorji/go/codec" codec1978 "github.com/ugorji/go/codec"
pkg3_v1 "k8s.io/api/core/v1"
pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkg2_types "k8s.io/apimachinery/pkg/types" pkg2_types "k8s.io/apimachinery/pkg/types"
"reflect" "reflect"
@ -62,10 +63,11 @@ func init() {
panic(err) panic(err)
} }
if false { // reference the types, but skip this branch at build/run time if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_v1.TypeMeta var v0 pkg3_v1.PersistentVolumeReclaimPolicy
var v1 pkg2_types.UID var v1 pkg1_v1.TypeMeta
var v2 time.Time var v2 pkg2_types.UID
_, _, _ = v0, v1, v2 var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
} }
} }
@ -83,16 +85,17 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [5]bool var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = x.Kind != "" yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != "" yyq2[1] = x.APIVersion != ""
yyq2[2] = true yyq2[2] = true
yyq2[4] = len(x.Parameters) != 0 yyq2[4] = len(x.Parameters) != 0
yyq2[5] = x.ReclaimPolicy != nil
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(5) r.EncodeArrayStart(6)
} else { } else {
yynn2 = 1 yynn2 = 1
for _, b := range yyq2 { for _, b := range yyq2 {
@ -234,6 +237,33 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
} }
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
if x.ReclaimPolicy == nil {
r.EncodeNil()
} else {
yy21 := *x.ReclaimPolicy
yysf22 := &yy21
yysf22.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("reclaimPolicy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ReclaimPolicy == nil {
r.EncodeNil()
} else {
yy23 := *x.ReclaimPolicy
yysf24 := &yy23
yysf24.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -356,6 +386,17 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.F.DecMapStringStringX(yyv12, false, d) z.F.DecMapStringStringX(yyv12, false, d)
} }
} }
case "reclaimPolicy":
if r.TryDecodeAsNil() {
if x.ReclaimPolicy != nil {
x.ReclaimPolicy = nil
}
} else {
if x.ReclaimPolicy == nil {
x.ReclaimPolicy = new(pkg3_v1.PersistentVolumeReclaimPolicy)
}
x.ReclaimPolicy.CodecDecodeSelf(d)
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -367,16 +408,16 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj14 int var yyj15 int
var yyb14 bool var yyb15 bool
var yyhl14 bool = l >= 0 var yyhl15 bool = l >= 0
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -384,21 +425,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
} else { } else {
yyv15 := &x.Kind yyv16 := &x.Kind
yym16 := z.DecBinary() yym17 := z.DecBinary()
_ = yym16 _ = yym17
if false { if false {
} else { } else {
*((*string)(yyv15)) = r.DecodeString() *((*string)(yyv16)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -406,21 +447,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.APIVersion = "" x.APIVersion = ""
} else { } else {
yyv17 := &x.APIVersion yyv18 := &x.APIVersion
yym18 := z.DecBinary() yym19 := z.DecBinary()
_ = yym18 _ = yym19
if false { if false {
} else { } else {
*((*string)(yyv17)) = r.DecodeString() *((*string)(yyv18)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -428,22 +469,22 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg1_v1.ObjectMeta{} x.ObjectMeta = pkg1_v1.ObjectMeta{}
} else { } else {
yyv19 := &x.ObjectMeta yyv20 := &x.ObjectMeta
yym20 := z.DecBinary() yym21 := z.DecBinary()
_ = yym20 _ = yym21
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv19) { } else if z.HasExtensions() && z.DecExt(yyv20) {
} else { } else {
z.DecFallback(yyv19, false) z.DecFallback(yyv20, false)
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -451,21 +492,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Provisioner = "" x.Provisioner = ""
} else { } else {
yyv21 := &x.Provisioner yyv22 := &x.Provisioner
yym22 := z.DecBinary() yym23 := z.DecBinary()
_ = yym22 _ = yym23
if false { if false {
} else { } else {
*((*string)(yyv21)) = r.DecodeString() *((*string)(yyv22)) = r.DecodeString()
} }
} }
yyj14++ yyj15++
if yyhl14 { if yyhl15 {
yyb14 = yyj14 > l yyb15 = yyj15 > l
} else { } else {
yyb14 = r.CheckBreak() yyb15 = r.CheckBreak()
} }
if yyb14 { if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -473,26 +514,47 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Parameters = nil x.Parameters = nil
} else { } else {
yyv23 := &x.Parameters yyv24 := &x.Parameters
yym24 := z.DecBinary() yym25 := z.DecBinary()
_ = yym24 _ = yym25
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv23, false, d) z.F.DecMapStringStringX(yyv24, false, d)
} }
} }
for { yyj15++
yyj14++ if yyhl15 {
if yyhl14 { yyb15 = yyj15 > l
yyb14 = yyj14 > l } else {
} else { yyb15 = r.CheckBreak()
yyb14 = r.CheckBreak() }
if yyb15 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.ReclaimPolicy != nil {
x.ReclaimPolicy = nil
} }
if yyb14 { } else {
if x.ReclaimPolicy == nil {
x.ReclaimPolicy = new(pkg3_v1.PersistentVolumeReclaimPolicy)
}
x.ReclaimPolicy.CodecDecodeSelf(d)
}
for {
yyj15++
if yyhl15 {
yyb15 = yyj15 > l
} else {
yyb15 = r.CheckBreak()
}
if yyb15 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj14-1, "") z.DecStructFieldNotFound(yyj15-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -904,7 +966,7 @@ func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.De
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 288) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -28,10 +28,11 @@ package v1beta1
// AUTO-GENERATED FUNCTIONS START HERE // AUTO-GENERATED FUNCTIONS START HERE
var map_StorageClass = map[string]string{ var map_StorageClass = map[string]string{
"": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
"provisioner": "Provisioner indicates the type of the provisioner.", "provisioner": "Provisioner indicates the type of the provisioner.",
"parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
"reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.",
} }
func (StorageClass) SwaggerDoc() map[string]string { func (StorageClass) SwaggerDoc() map[string]string {

View File

@ -21,6 +21,7 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
v1 "k8s.io/api/core/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
@ -59,6 +60,15 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) {
(*out)[key] = val (*out)[key] = val
} }
} }
if in.ReclaimPolicy != nil {
in, out := &in.ReclaimPolicy, &out.ReclaimPolicy
if *in == nil {
*out = nil
} else {
*out = new(v1.PersistentVolumeReclaimPolicy)
**out = **in
}
}
return return
} }