Added SourceVolumeMode field to v1 spec in VolumeSnapshotContents API.
Update code-gen to v0.23.4 and controller-gen to v0.8.0
This commit is contained in:
@@ -328,6 +328,12 @@ type VolumeSnapshotContentSpec struct {
|
||||
// This field is immutable after creation.
|
||||
// Required.
|
||||
Source VolumeSnapshotContentSource `json:"source" protobuf:"bytes,5,opt,name=source"`
|
||||
|
||||
// SourceVolumeMode is the mode of the volume whose snapshot is taken.
|
||||
// Can be either “Filesystem” or “Block”.
|
||||
// If not specified, it indicates the source volume's mode is unknown.
|
||||
// +optional
|
||||
SourceVolumeMode *SourceVolumeMode `json:"sourceVolumeMode" protobuf:"bytes,6,opt,name=sourceVolumeMode"`
|
||||
}
|
||||
|
||||
// VolumeSnapshotContentSource represents the CSI source of a snapshot.
|
||||
@@ -438,3 +444,14 @@ type VolumeSnapshotError struct {
|
||||
// +optional
|
||||
Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
|
||||
}
|
||||
|
||||
// SourceVolumeMode describes the volume mode of the source volume from which a snapshot was created.
|
||||
// +enum
|
||||
type SourceVolumeMode string
|
||||
|
||||
const (
|
||||
// SourceVolumeModeBlock describes a snapshot that is created from a raw block volume.
|
||||
SourceVolumeModeBlock SourceVolumeMode = "Block"
|
||||
// SourceVolumeModeFilesystem describes a snapshot that is created from a filesystem volume.
|
||||
SourceVolumeModeFilesystem SourceVolumeMode = "Filesystem"
|
||||
)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -224,6 +224,11 @@ func (in *VolumeSnapshotContentSpec) DeepCopyInto(out *VolumeSnapshotContentSpec
|
||||
**out = **in
|
||||
}
|
||||
in.Source.DeepCopyInto(&out.Source)
|
||||
if in.SourceVolumeMode != nil {
|
||||
in, out := &in.SourceVolumeMode, &out.SourceVolumeMode
|
||||
*out = new(SourceVolumeMode)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
Reference in New Issue
Block a user