mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 06:26:44 +00:00
Add new resource filters can separate cluster and namespace scope resources.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
@@ -150,6 +150,30 @@ func (b *BackupBuilder) ExcludedResources(resources ...string) *BackupBuilder {
|
||||
return b
|
||||
}
|
||||
|
||||
// IncludedClusterScopeResources sets the Backup's included cluster resources.
|
||||
func (b *BackupBuilder) IncludedClusterScopeResources(resources ...string) *BackupBuilder {
|
||||
b.object.Spec.IncludedClusterScopeResources = resources
|
||||
return b
|
||||
}
|
||||
|
||||
// ExcludedClusterScopeResources sets the Backup's excluded cluster resources.
|
||||
func (b *BackupBuilder) ExcludedClusterScopeResources(resources ...string) *BackupBuilder {
|
||||
b.object.Spec.ExcludedClusterScopeResources = resources
|
||||
return b
|
||||
}
|
||||
|
||||
// IncludedNamespacedResources sets the Backup's included namespaced resources.
|
||||
func (b *BackupBuilder) IncludedNamespacedResources(resources ...string) *BackupBuilder {
|
||||
b.object.Spec.IncludedNamespacedResources = resources
|
||||
return b
|
||||
}
|
||||
|
||||
// ExcludedNamespacedResources sets the Backup's excluded namespaced resources.
|
||||
func (b *BackupBuilder) ExcludedNamespacedResources(resources ...string) *BackupBuilder {
|
||||
b.object.Spec.ExcludedNamespacedResources = resources
|
||||
return b
|
||||
}
|
||||
|
||||
// IncludeClusterResources sets the Backup's "include cluster resources" flag.
|
||||
func (b *BackupBuilder) IncludeClusterResources(val bool) *BackupBuilder {
|
||||
b.object.Spec.IncludeClusterResources = &val
|
||||
|
||||
Reference in New Issue
Block a user