mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 19:54:00 +00:00
Add the ConfigMap-specified parameters into velero install CLI.
Rename backup-repository-config to backup-repository-configmap. Rename repo-maintenance-job-config to repo-maintenance-job-configmap. Rename node-agent-config to node-agent-configmap. Add those three parameters to `velero install` CLI. Modify the design and the site documents. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -86,6 +86,9 @@ type Options struct {
|
||||
ScheduleSkipImmediately bool
|
||||
PodResources kubeutil.PodResources
|
||||
KeepLatestMaintenanceJobs int
|
||||
BackupRepoConfigMap string
|
||||
RepoMaintenanceJobConfigMap string
|
||||
NodeAgentConfigMap string
|
||||
}
|
||||
|
||||
// BindFlags adds command line values to the options struct.
|
||||
@@ -161,6 +164,24 @@ func (o *Options) BindFlags(flags *pflag.FlagSet) {
|
||||
o.PodResources.MemoryLimit,
|
||||
"Memory limit for maintenance jobs. Default is no limit.",
|
||||
)
|
||||
flags.StringVar(
|
||||
&o.BackupRepoConfigMap,
|
||||
"backup-repository-configmap",
|
||||
o.BackupRepoConfigMap,
|
||||
"The name of configMap containing backup repository configurations.",
|
||||
)
|
||||
flags.StringVar(
|
||||
&o.RepoMaintenanceJobConfigMap,
|
||||
"repo-maintenance-job-configmap",
|
||||
o.RepoMaintenanceJobConfigMap,
|
||||
"The name of ConfigMap containing repository maintenance Job configurations.",
|
||||
)
|
||||
flags.StringVar(
|
||||
&o.NodeAgentConfigMap,
|
||||
"node-agent-configmap",
|
||||
o.NodeAgentConfigMap,
|
||||
"The name of ConfigMap containing node-agent configurations.",
|
||||
)
|
||||
}
|
||||
|
||||
// NewInstallOptions instantiates a new, default InstallOptions struct.
|
||||
@@ -259,6 +280,9 @@ func (o *Options) AsVeleroOptions() (*install.VeleroOptions, error) {
|
||||
ScheduleSkipImmediately: o.ScheduleSkipImmediately,
|
||||
PodResources: o.PodResources,
|
||||
KeepLatestMaintenanceJobs: o.KeepLatestMaintenanceJobs,
|
||||
BackupRepoConfigMap: o.BackupRepoConfigMap,
|
||||
RepoMaintenanceJobConfigMap: o.RepoMaintenanceJobConfigMap,
|
||||
NodeAgentConfigMap: o.NodeAgentConfigMap,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user