From 7111f3cea2f79071bbb76dcd31057e69aab4c2bc Mon Sep 17 00:00:00 2001 From: Scott Seago Date: Wed, 20 Aug 2025 16:14:43 -0400 Subject: [PATCH] feat: Remove pvc-for-tmp install arg Co-authored-by: aider (gemini/gemini-2.5-pro) Signed-off-by: Scott Seago --- pkg/cmd/cli/install/install.go | 8 -------- pkg/install/deployment.go | 29 ----------------------------- pkg/install/resources.go | 5 ----- 3 files changed, 42 deletions(-) diff --git a/pkg/cmd/cli/install/install.go b/pkg/cmd/cli/install/install.go index 748b6953e..283bfa557 100644 --- a/pkg/cmd/cli/install/install.go +++ b/pkg/cmd/cli/install/install.go @@ -90,7 +90,6 @@ type Options struct { NodeAgentConfigMap string ItemBlockWorkerCount int ConcurrentBackups int - PVCForTmp string NodeAgentDisableHostPath bool kubeletRootDir string ServerPriorityClassName string @@ -192,12 +191,6 @@ func (o *Options) BindFlags(flags *pflag.FlagSet) { o.NodeAgentConfigMap, "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( &o.ItemBlockWorkerCount, "item-block-worker-count", @@ -328,7 +321,6 @@ func (o *Options) AsVeleroOptions() (*install.VeleroOptions, error) { NodeAgentConfigMap: o.NodeAgentConfigMap, ItemBlockWorkerCount: o.ItemBlockWorkerCount, ConcurrentBackups: o.ConcurrentBackups, - PVCForTmp: o.PVCForTmp, KubeletRootDir: o.kubeletRootDir, NodeAgentDisableHostPath: o.NodeAgentDisableHostPath, ServerPriorityClassName: o.ServerPriorityClassName, diff --git a/pkg/install/deployment.go b/pkg/install/deployment.go index 84f94d01d..d1010d294 100644 --- a/pkg/install/deployment.go +++ b/pkg/install/deployment.go @@ -60,7 +60,6 @@ type podTemplateConfig struct { nodeAgentConfigMap string itemBlockWorkerCount int concurrentBackups int - pvcForTmp string forWindows bool kubeletRootDir string 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 { return func(c *podTemplateConfig) { 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 { deployment.Spec.Template.Spec.Volumes = append( deployment.Spec.Template.Spec.Volumes, diff --git a/pkg/install/resources.go b/pkg/install/resources.go index 1d550ca86..5c7534774 100644 --- a/pkg/install/resources.go +++ b/pkg/install/resources.go @@ -272,7 +272,6 @@ type VeleroOptions struct { NodeAgentConfigMap string ItemBlockWorkerCount int ConcurrentBackups int - PVCForTmp string KubeletRootDir string NodeAgentDisableHostPath bool ServerPriorityClassName string @@ -367,10 +366,6 @@ func AllResources(o *VeleroOptions) *unstructured.UnstructuredList { WithConcurrentBackups(o.ConcurrentBackups), } - if o.PVCForTmp != "" { - deployOpts = append(deployOpts, WithPVCForTmp(o.PVCForTmp)) - } - if o.ServerPriorityClassName != "" { deployOpts = append(deployOpts, WithPriorityClassName(o.ServerPriorityClassName)) }