mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 19:56:06 +00:00
Add --default-resource-modifier-configmap server flag
Add DefaultResourceModifierConfigMap field to the server Config struct and bind it as a CLI flag. When set, it references a ConfigMap name in the Velero namespace containing default resource modifier rules to apply to all restores. Follows the existing pattern used by --backup-repository-configmap and --repo-maintenance-job-configmap. Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
This commit is contained in:
@@ -182,6 +182,7 @@ type Config struct {
|
||||
ItemBlockWorkerCount int
|
||||
ConcurrentBackups int
|
||||
GlobalBackupVolumePoliciesConfigMap string
|
||||
DefaultResourceModifierConfigMap string
|
||||
}
|
||||
|
||||
func GetDefaultConfig() *Config {
|
||||
@@ -282,4 +283,10 @@ func (c *Config) BindFlags(flags *pflag.FlagSet) {
|
||||
c.GlobalBackupVolumePoliciesConfigMap,
|
||||
"The name of a ConfigMap in the Velero install namespace holding global backup volume policies that are merged into every backup. Optional.",
|
||||
)
|
||||
flags.StringVar(
|
||||
&c.DefaultResourceModifierConfigMap,
|
||||
"default-resource-modifier-configmap",
|
||||
c.DefaultResourceModifierConfigMap,
|
||||
"The name of a ConfigMap in the Velero namespace containing default resource modifier rules applied to all restores. Ignored when a per-restore resource modifier is specified.",
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user