mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 13:55:20 +00:00
cache volume configuration
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package builder
|
||||
|
||||
import (
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
storagev1api "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
@@ -87,3 +88,9 @@ func (b *StorageClassBuilder) Provisioner(provisioner string) *StorageClassBuild
|
||||
b.object.Provisioner = provisioner
|
||||
return b
|
||||
}
|
||||
|
||||
// ReclaimPolicy sets StorageClass's reclaimPolicy.
|
||||
func (b *StorageClassBuilder) ReclaimPolicy(policy corev1api.PersistentVolumeReclaimPolicy) *StorageClassBuilder {
|
||||
b.object.ReclaimPolicy = &policy
|
||||
return b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user