From f011fc4ef658cd0e1c948c618f08b85c249bba04 Mon Sep 17 00:00:00 2001 From: Shubham Pampattiwar Date: Mon, 27 Jul 2026 20:51:29 -0700 Subject: [PATCH] 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 --- pkg/cmd/server/config/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cmd/server/config/config.go b/pkg/cmd/server/config/config.go index c8080da21..08b58a1bd 100644 --- a/pkg/cmd/server/config/config.go +++ b/pkg/cmd/server/config/config.go @@ -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.", + ) }