mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 19:54:00 +00:00
feat: Remove pvc-for-tmp install arg
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat> Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
@@ -90,7 +90,6 @@ type Options struct {
|
|||||||
NodeAgentConfigMap string
|
NodeAgentConfigMap string
|
||||||
ItemBlockWorkerCount int
|
ItemBlockWorkerCount int
|
||||||
ConcurrentBackups int
|
ConcurrentBackups int
|
||||||
PVCForTmp string
|
|
||||||
NodeAgentDisableHostPath bool
|
NodeAgentDisableHostPath bool
|
||||||
kubeletRootDir string
|
kubeletRootDir string
|
||||||
ServerPriorityClassName string
|
ServerPriorityClassName string
|
||||||
@@ -192,12 +191,6 @@ func (o *Options) BindFlags(flags *pflag.FlagSet) {
|
|||||||
o.NodeAgentConfigMap,
|
o.NodeAgentConfigMap,
|
||||||
"The name of ConfigMap containing node-agent configurations.",
|
"The name of ConfigMap containing node-agent configurations.",
|
||||||
)
|
)
|
||||||
flags.StringVar(
|
|
||||||
&o.PVCForTmp,
|
|
||||||
"pvc-for-tmp",
|
|
||||||
o.PVCForTmp,
|
|
||||||
"The name of PVC to be used as /tmp dir of Velero server pod. Optional.",
|
|
||||||
)
|
|
||||||
flags.IntVar(
|
flags.IntVar(
|
||||||
&o.ItemBlockWorkerCount,
|
&o.ItemBlockWorkerCount,
|
||||||
"item-block-worker-count",
|
"item-block-worker-count",
|
||||||
@@ -328,7 +321,6 @@ func (o *Options) AsVeleroOptions() (*install.VeleroOptions, error) {
|
|||||||
NodeAgentConfigMap: o.NodeAgentConfigMap,
|
NodeAgentConfigMap: o.NodeAgentConfigMap,
|
||||||
ItemBlockWorkerCount: o.ItemBlockWorkerCount,
|
ItemBlockWorkerCount: o.ItemBlockWorkerCount,
|
||||||
ConcurrentBackups: o.ConcurrentBackups,
|
ConcurrentBackups: o.ConcurrentBackups,
|
||||||
PVCForTmp: o.PVCForTmp,
|
|
||||||
KubeletRootDir: o.kubeletRootDir,
|
KubeletRootDir: o.kubeletRootDir,
|
||||||
NodeAgentDisableHostPath: o.NodeAgentDisableHostPath,
|
NodeAgentDisableHostPath: o.NodeAgentDisableHostPath,
|
||||||
ServerPriorityClassName: o.ServerPriorityClassName,
|
ServerPriorityClassName: o.ServerPriorityClassName,
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ type podTemplateConfig struct {
|
|||||||
nodeAgentConfigMap string
|
nodeAgentConfigMap string
|
||||||
itemBlockWorkerCount int
|
itemBlockWorkerCount int
|
||||||
concurrentBackups int
|
concurrentBackups int
|
||||||
pvcForTmp string
|
|
||||||
forWindows bool
|
forWindows bool
|
||||||
kubeletRootDir string
|
kubeletRootDir string
|
||||||
nodeAgentDisableHostPath bool
|
nodeAgentDisableHostPath bool
|
||||||
@@ -232,12 +231,6 @@ func WithConcurrentBackups(concurrentBackups int) podTemplateOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func WithPVCForTmp(pvcForTmp string) podTemplateOption {
|
|
||||||
return func(c *podTemplateConfig) {
|
|
||||||
c.pvcForTmp = pvcForTmp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func WithPriorityClassName(priorityClassName string) podTemplateOption {
|
func WithPriorityClassName(priorityClassName string) podTemplateOption {
|
||||||
return func(c *podTemplateConfig) {
|
return func(c *podTemplateConfig) {
|
||||||
c.priorityClassName = priorityClassName
|
c.priorityClassName = priorityClassName
|
||||||
@@ -438,28 +431,6 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1api.Deployme
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.pvcForTmp != "" {
|
|
||||||
deployment.Spec.Template.Spec.Volumes = append(
|
|
||||||
deployment.Spec.Template.Spec.Volumes,
|
|
||||||
corev1api.Volume{
|
|
||||||
Name: "tmp",
|
|
||||||
VolumeSource: corev1api.VolumeSource{
|
|
||||||
PersistentVolumeClaim: &corev1api.PersistentVolumeClaimVolumeSource{
|
|
||||||
ClaimName: c.pvcForTmp,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
deployment.Spec.Template.Spec.Containers[0].VolumeMounts = append(
|
|
||||||
deployment.Spec.Template.Spec.Containers[0].VolumeMounts,
|
|
||||||
corev1api.VolumeMount{
|
|
||||||
Name: "tmp",
|
|
||||||
MountPath: "/tmp",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if c.withSecret {
|
if c.withSecret {
|
||||||
deployment.Spec.Template.Spec.Volumes = append(
|
deployment.Spec.Template.Spec.Volumes = append(
|
||||||
deployment.Spec.Template.Spec.Volumes,
|
deployment.Spec.Template.Spec.Volumes,
|
||||||
|
|||||||
@@ -272,7 +272,6 @@ type VeleroOptions struct {
|
|||||||
NodeAgentConfigMap string
|
NodeAgentConfigMap string
|
||||||
ItemBlockWorkerCount int
|
ItemBlockWorkerCount int
|
||||||
ConcurrentBackups int
|
ConcurrentBackups int
|
||||||
PVCForTmp string
|
|
||||||
KubeletRootDir string
|
KubeletRootDir string
|
||||||
NodeAgentDisableHostPath bool
|
NodeAgentDisableHostPath bool
|
||||||
ServerPriorityClassName string
|
ServerPriorityClassName string
|
||||||
@@ -367,10 +366,6 @@ func AllResources(o *VeleroOptions) *unstructured.UnstructuredList {
|
|||||||
WithConcurrentBackups(o.ConcurrentBackups),
|
WithConcurrentBackups(o.ConcurrentBackups),
|
||||||
}
|
}
|
||||||
|
|
||||||
if o.PVCForTmp != "" {
|
|
||||||
deployOpts = append(deployOpts, WithPVCForTmp(o.PVCForTmp))
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.ServerPriorityClassName != "" {
|
if o.ServerPriorityClassName != "" {
|
||||||
deployOpts = append(deployOpts, WithPriorityClassName(o.ServerPriorityClassName))
|
deployOpts = append(deployOpts, WithPriorityClassName(o.ServerPriorityClassName))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user