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:
Shubham Pampattiwar
2026-08-03 13:19:38 -07:00
parent b74f8c9511
commit f011fc4ef6
+7
View File
@@ -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.",
)
}