mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
vendor updates
This commit is contained in:
3
vendor/k8s.io/kubernetes/pkg/apis/storage/fuzzer/fuzzer.go
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/storage/fuzzer/fuzzer.go
generated
vendored
@ -22,6 +22,7 @@ import (
|
||||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/apis/storage"
|
||||
storageapi "k8s.io/kubernetes/pkg/apis/storage"
|
||||
)
|
||||
|
||||
// Funcs returns the fuzzer functions for the storage api group.
|
||||
@ -31,6 +32,8 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
c.FuzzNoCustom(obj) // fuzz self without calling this function again
|
||||
reclamationPolicies := []api.PersistentVolumeReclaimPolicy{api.PersistentVolumeReclaimDelete, api.PersistentVolumeReclaimRetain}
|
||||
obj.ReclaimPolicy = &reclamationPolicies[c.Rand.Intn(len(reclamationPolicies))]
|
||||
bindingModes := []storageapi.VolumeBindingMode{storageapi.VolumeBindingImmediate, storageapi.VolumeBindingWaitForFirstConsumer}
|
||||
obj.VolumeBindingMode = &bindingModes[c.Rand.Intn(len(bindingModes))]
|
||||
},
|
||||
}
|
||||
}
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD
generated
vendored
@ -37,8 +37,7 @@ filegroup(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["util_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/storage/util",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/apis/storage:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/apis/storage/util/util_test.go
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/storage/util/util_test.go
generated
vendored
@ -27,6 +27,9 @@ func TestDropAlphaFields(t *testing.T) {
|
||||
bindingMode := storage.VolumeBindingWaitForFirstConsumer
|
||||
|
||||
// Test that field gets dropped when feature gate is not set
|
||||
if err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=false"); err != nil {
|
||||
t.Fatalf("Failed to set feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
class := &storage.StorageClass{
|
||||
VolumeBindingMode: &bindingMode,
|
||||
}
|
||||
|
1
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD
generated
vendored
@ -48,7 +48,6 @@ filegroup(
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
srcs = ["defaults_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/storage/v1_test",
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/storage/install:go_default_library",
|
||||
|
9
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults_test.go
generated
vendored
9
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults_test.go
generated
vendored
@ -52,6 +52,10 @@ func TestSetDefaultVolumeBindingMode(t *testing.T) {
|
||||
class := &storagev1.StorageClass{}
|
||||
|
||||
// When feature gate is disabled, field should not be defaulted
|
||||
err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=false")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to enable feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(class)).(*storagev1.StorageClass)
|
||||
if output.VolumeBindingMode != nil {
|
||||
t.Errorf("Expected VolumeBindingMode to not be defaulted, got: %+v", output.VolumeBindingMode)
|
||||
@ -59,12 +63,11 @@ func TestSetDefaultVolumeBindingMode(t *testing.T) {
|
||||
|
||||
class = &storagev1.StorageClass{}
|
||||
|
||||
err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=true")
|
||||
// When feature gate is enabled, field should be defaulted
|
||||
err = utilfeature.DefaultFeatureGate.Set("VolumeScheduling=true")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to enable feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
|
||||
// When feature gate is enabled, field should be defaulted
|
||||
defaultMode := storagev1.VolumeBindingImmediate
|
||||
output = roundTrip(t, runtime.Object(class)).(*storagev1.StorageClass)
|
||||
outMode := output.VolumeBindingMode
|
||||
|
5
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go
generated
vendored
5
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go
generated
vendored
@ -16,18 +16,19 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/storage/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
core "k8s.io/kubernetes/pkg/apis/core"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by defaulter-gen. Do not edit it manually!
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
|
5
vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go
generated
vendored
5
vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go
generated
vendored
@ -16,16 +16,17 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
v1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.defaults.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.defaults.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by defaulter-gen. Do not edit it manually!
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
|
1
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD
generated
vendored
@ -48,7 +48,6 @@ filegroup(
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
srcs = ["defaults_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/storage/v1beta1_test",
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/storage/install:go_default_library",
|
||||
|
9
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults_test.go
generated
vendored
9
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults_test.go
generated
vendored
@ -52,6 +52,10 @@ func TestSetDefaultVolumeBindingMode(t *testing.T) {
|
||||
class := &storagev1beta1.StorageClass{}
|
||||
|
||||
// When feature gate is disabled, field should not be defaulted
|
||||
err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=false")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to enable feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
output := roundTrip(t, runtime.Object(class)).(*storagev1beta1.StorageClass)
|
||||
if output.VolumeBindingMode != nil {
|
||||
t.Errorf("Expected VolumeBindingMode to not be defaulted, got: %+v", output.VolumeBindingMode)
|
||||
@ -59,12 +63,11 @@ func TestSetDefaultVolumeBindingMode(t *testing.T) {
|
||||
|
||||
class = &storagev1beta1.StorageClass{}
|
||||
|
||||
err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=true")
|
||||
// When feature gate is enabled, field should be defaulted
|
||||
err = utilfeature.DefaultFeatureGate.Set("VolumeScheduling=true")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to enable feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
|
||||
// When feature gate is enabled, field should be defaulted
|
||||
defaultMode := storagev1beta1.VolumeBindingImmediate
|
||||
output = roundTrip(t, runtime.Object(class)).(*storagev1beta1.StorageClass)
|
||||
outMode := output.VolumeBindingMode
|
||||
|
167
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go
generated
vendored
167
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go
generated
vendored
@ -16,18 +16,19 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
core "k8s.io/kubernetes/pkg/apis/core"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -42,6 +43,18 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
Convert_storage_StorageClass_To_v1beta1_StorageClass,
|
||||
Convert_v1beta1_StorageClassList_To_storage_StorageClassList,
|
||||
Convert_storage_StorageClassList_To_v1beta1_StorageClassList,
|
||||
Convert_v1beta1_VolumeAttachment_To_storage_VolumeAttachment,
|
||||
Convert_storage_VolumeAttachment_To_v1beta1_VolumeAttachment,
|
||||
Convert_v1beta1_VolumeAttachmentList_To_storage_VolumeAttachmentList,
|
||||
Convert_storage_VolumeAttachmentList_To_v1beta1_VolumeAttachmentList,
|
||||
Convert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource,
|
||||
Convert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource,
|
||||
Convert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec,
|
||||
Convert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec,
|
||||
Convert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus,
|
||||
Convert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus,
|
||||
Convert_v1beta1_VolumeError_To_storage_VolumeError,
|
||||
Convert_storage_VolumeError_To_v1beta1_VolumeError,
|
||||
)
|
||||
}
|
||||
|
||||
@ -98,3 +111,153 @@ func autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storag
|
||||
func Convert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *v1beta1.StorageClassList, s conversion.Scope) error {
|
||||
return autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeAttachment_To_storage_VolumeAttachment(in *v1beta1.VolumeAttachment, out *storage.VolumeAttachment, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeAttachment_To_storage_VolumeAttachment is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeAttachment_To_storage_VolumeAttachment(in *v1beta1.VolumeAttachment, out *storage.VolumeAttachment, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeAttachment_To_storage_VolumeAttachment(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachment_To_v1beta1_VolumeAttachment(in *storage.VolumeAttachment, out *v1beta1.VolumeAttachment, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachment_To_v1beta1_VolumeAttachment is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachment_To_v1beta1_VolumeAttachment(in *storage.VolumeAttachment, out *v1beta1.VolumeAttachment, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachment_To_v1beta1_VolumeAttachment(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in *v1beta1.VolumeAttachmentList, out *storage.VolumeAttachmentList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]storage.VolumeAttachment)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeAttachmentList_To_storage_VolumeAttachmentList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in *v1beta1.VolumeAttachmentList, out *storage.VolumeAttachmentList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeAttachmentList_To_storage_VolumeAttachmentList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentList_To_v1beta1_VolumeAttachmentList(in *storage.VolumeAttachmentList, out *v1beta1.VolumeAttachmentList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1beta1.VolumeAttachment)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentList_To_v1beta1_VolumeAttachmentList is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentList_To_v1beta1_VolumeAttachmentList(in *storage.VolumeAttachmentList, out *v1beta1.VolumeAttachmentList, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentList_To_v1beta1_VolumeAttachmentList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in *v1beta1.VolumeAttachmentSource, out *storage.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
out.PersistentVolumeName = (*string)(unsafe.Pointer(in.PersistentVolumeName))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in *v1beta1.VolumeAttachmentSource, out *storage.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource(in *storage.VolumeAttachmentSource, out *v1beta1.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
out.PersistentVolumeName = (*string)(unsafe.Pointer(in.PersistentVolumeName))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource(in *storage.VolumeAttachmentSource, out *v1beta1.VolumeAttachmentSource, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in *v1beta1.VolumeAttachmentSpec, out *storage.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
out.Attacher = in.Attacher
|
||||
if err := Convert_v1beta1_VolumeAttachmentSource_To_storage_VolumeAttachmentSource(&in.Source, &out.Source, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeName = in.NodeName
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in *v1beta1.VolumeAttachmentSpec, out *storage.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec(in *storage.VolumeAttachmentSpec, out *v1beta1.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
out.Attacher = in.Attacher
|
||||
if err := Convert_storage_VolumeAttachmentSource_To_v1beta1_VolumeAttachmentSource(&in.Source, &out.Source, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeName = in.NodeName
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec(in *storage.VolumeAttachmentSpec, out *v1beta1.VolumeAttachmentSpec, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentSpec_To_v1beta1_VolumeAttachmentSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in *v1beta1.VolumeAttachmentStatus, out *storage.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
out.Attached = in.Attached
|
||||
out.AttachmentMetadata = *(*map[string]string)(unsafe.Pointer(&in.AttachmentMetadata))
|
||||
out.AttachError = (*storage.VolumeError)(unsafe.Pointer(in.AttachError))
|
||||
out.DetachError = (*storage.VolumeError)(unsafe.Pointer(in.DetachError))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in *v1beta1.VolumeAttachmentStatus, out *storage.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeAttachmentStatus_To_storage_VolumeAttachmentStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus(in *storage.VolumeAttachmentStatus, out *v1beta1.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
out.Attached = in.Attached
|
||||
out.AttachmentMetadata = *(*map[string]string)(unsafe.Pointer(&in.AttachmentMetadata))
|
||||
out.AttachError = (*v1beta1.VolumeError)(unsafe.Pointer(in.AttachError))
|
||||
out.DetachError = (*v1beta1.VolumeError)(unsafe.Pointer(in.DetachError))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus(in *storage.VolumeAttachmentStatus, out *v1beta1.VolumeAttachmentStatus, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeAttachmentStatus_To_v1beta1_VolumeAttachmentStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_VolumeError_To_storage_VolumeError(in *v1beta1.VolumeError, out *storage.VolumeError, s conversion.Scope) error {
|
||||
out.Time = in.Time
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_VolumeError_To_storage_VolumeError is an autogenerated conversion function.
|
||||
func Convert_v1beta1_VolumeError_To_storage_VolumeError(in *v1beta1.VolumeError, out *storage.VolumeError, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_VolumeError_To_storage_VolumeError(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_storage_VolumeError_To_v1beta1_VolumeError(in *storage.VolumeError, out *v1beta1.VolumeError, s conversion.Scope) error {
|
||||
out.Time = in.Time
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_storage_VolumeError_To_v1beta1_VolumeError is an autogenerated conversion function.
|
||||
func Convert_storage_VolumeError_To_v1beta1_VolumeError(in *storage.VolumeError, out *v1beta1.VolumeError, s conversion.Scope) error {
|
||||
return autoConvert_storage_VolumeError_To_v1beta1_VolumeError(in, out, s)
|
||||
}
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by defaulter-gen. Do not edit it manually!
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD
generated
vendored
@ -26,8 +26,7 @@ go_library(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["validation_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/storage/validation",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/apis/core:go_default_library",
|
||||
"//pkg/apis/storage:go_default_library",
|
||||
|
31
vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go
generated
vendored
31
vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go
generated
vendored
@ -42,16 +42,18 @@ func TestValidateStorageClass(t *testing.T) {
|
||||
successCases := []storage.StorageClass{
|
||||
{
|
||||
// empty parameters
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
Parameters: map[string]string{},
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
Parameters: map[string]string{},
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
VolumeBindingMode: &immediateMode1,
|
||||
},
|
||||
{
|
||||
// nil parameters
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
VolumeBindingMode: &immediateMode1,
|
||||
},
|
||||
{
|
||||
// some parameters
|
||||
@ -62,13 +64,15 @@ func TestValidateStorageClass(t *testing.T) {
|
||||
"foo-parameter": "free-form-string",
|
||||
"foo-parameter2": "{\"embedded\": \"json\", \"with\": {\"structures\":\"inside\"}}",
|
||||
},
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
VolumeBindingMode: &immediateMode1,
|
||||
},
|
||||
{
|
||||
// retain reclaimPolicy
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
ReclaimPolicy: &retainReclaimPolicy,
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
|
||||
Provisioner: "kubernetes.io/foo-provisioner",
|
||||
ReclaimPolicy: &retainReclaimPolicy,
|
||||
VolumeBindingMode: &immediateMode1,
|
||||
},
|
||||
}
|
||||
|
||||
@ -144,6 +148,7 @@ func TestAlphaExpandPersistentVolumesFeatureValidation(t *testing.T) {
|
||||
Parameters: map[string]string{},
|
||||
ReclaimPolicy: &deleteReclaimPolicy,
|
||||
AllowVolumeExpansion: &falseVar,
|
||||
VolumeBindingMode: &immediateMode1,
|
||||
}
|
||||
|
||||
// Enable alpha feature ExpandPersistentVolumes
|
||||
@ -462,6 +467,10 @@ func TestValidateVolumeBindingModeAlphaDisabled(t *testing.T) {
|
||||
"invalid mode": makeClassWithBinding(&invalidMode),
|
||||
}
|
||||
|
||||
err := utilfeature.DefaultFeatureGate.Set("VolumeScheduling=false")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to enable feature gate for VolumeScheduling: %v", err)
|
||||
}
|
||||
for testName, storageClass := range errorCases {
|
||||
if errs := ValidateStorageClass(storageClass); len(errs) == 0 {
|
||||
t.Errorf("Expected failure for test: %v", testName)
|
||||
|
14
vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go
generated
vendored
14
vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package storage
|
||||
|
||||
@ -86,9 +86,8 @@ func (in *StorageClass) DeepCopy() *StorageClass {
|
||||
func (in *StorageClass) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
@ -120,9 +119,8 @@ func (in *StorageClassList) DeepCopy() *StorageClassList {
|
||||
func (in *StorageClassList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
@ -149,9 +147,8 @@ func (in *VolumeAttachment) DeepCopy() *VolumeAttachment {
|
||||
func (in *VolumeAttachment) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
@ -183,9 +180,8 @@ func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList {
|
||||
func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
|
Reference in New Issue
Block a user