diff --git a/pkg/install/deployment_test.go b/pkg/install/deployment_test.go index 826ebd7b8d..1d244e3be9 100644 --- a/pkg/install/deployment_test.go +++ b/pkg/install/deployment_test.go @@ -67,5 +67,5 @@ func TestDeployment(t *testing.T) { deploy = Deployment("velero", WithEnableInformerCache()) assert.Len(t, deploy.Spec.Template.Spec.Containers[0].Args, 2) - assert.Equal(t, "--enable-informer-cache=false", deploy.Spec.Template.Spec.Containers[0].Args[1]) + assert.Equal(t, "--enable-informer-cache=true", deploy.Spec.Template.Spec.Containers[0].Args[1]) } diff --git a/test/e2e/Makefile b/test/e2e/Makefile index 7bf80c3513..7da9a91174 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -104,7 +104,7 @@ UPLOADER_TYPE ?= SNAPSHOT_MOVE_DATA ?= false DATA_MOVER_PLUGIN ?= -DISABLE_INFORMER_CACHE ?= false +ENABLE_INFORMER_CACHE ?= true .PHONY:ginkgo @@ -157,7 +157,7 @@ run: ginkgo -standby-cluster-plugins=$(STANDBY_CLUSTER_PLUGINS) \ -standby-cluster-object-store-provider=$(STANDBY_CLUSTER_OBJECT_STORE_PROVIDER) \ -debug-velero-pod-restart=$(DEBUG_VELERO_POD_RESTART) \ - -disable-informer-cache=$(DISABLE_INFORMER_CACHE) + -enable-informer-cache=$(ENABLE_INFORMER_CACHE) build: ginkgo diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 9464dfd100..c03cd09013 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -94,7 +94,7 @@ func init() { flag.StringVar(&VeleroCfg.StandbyClusterPlugins, "standby-cluster-plugins", "", "plugins provider for standby cluster.") flag.StringVar(&VeleroCfg.StandbyClusterOjbectStoreProvider, "standby-cluster-object-store-provider", "", "object store provider for standby cluster.") flag.BoolVar(&VeleroCfg.DebugVeleroPodRestart, "debug-velero-pod-restart", false, "a switch for debugging velero pod restart.") - flag.BoolVar(&VeleroCfg.DisableInformerCache, "disable-informer-cache", false, "a switch for disable informer cache.") + flag.BoolVar(&VeleroCfg.EnableInformerCache, "enable-informer-cache", true, "a switch for enable informer cache.") } var _ = Describe("[APIGroup][APIVersion] Velero tests with various CRD API group versions", APIGropuVersionsTest) diff --git a/test/e2e/migration/migration.go b/test/e2e/migration/migration.go index 6b389d4951..a6da31d382 100644 --- a/test/e2e/migration/migration.go +++ b/test/e2e/migration/migration.go @@ -167,8 +167,8 @@ func MigrationTest(useVolumeSnapshots bool, veleroCLI2Version VeleroCLI2Version) OriginVeleroCfg.Plugins = "" //TODO: Remove this setting when migration path is from 1.13 to higher version //TODO: or self, because version 1.12 and older versions have no this parameter. - OriginVeleroCfg.WithoutDisableInformerCacheParam = true - OriginVeleroCfg.DisableInformerCache = false + OriginVeleroCfg.WithoutEnableInformerCacheParam = false + OriginVeleroCfg.EnableInformerCache = true } Expect(VeleroInstall(context.Background(), &OriginVeleroCfg, false)).To(Succeed()) if veleroCLI2Version.VeleroVersion != "self" { diff --git a/test/e2e/upgrade/upgrade.go b/test/e2e/upgrade/upgrade.go index 9a70daae5c..047723b9e1 100644 --- a/test/e2e/upgrade/upgrade.go +++ b/test/e2e/upgrade/upgrade.go @@ -147,8 +147,8 @@ func BackupUpgradeRestoreTest(useVolumeSnapshots bool, veleroCLI2Version VeleroC } //TODO: Remove this setting when upgrade path is from 1.13 to higher //TODO: version, or self version 1.12 and older versions have no this parameter. - tmpCfgForOldVeleroInstall.WithoutDisableInformerCacheParam = true - tmpCfgForOldVeleroInstall.DisableInformerCache = false + tmpCfgForOldVeleroInstall.WithoutEnableInformerCacheParam = false + tmpCfgForOldVeleroInstall.EnableInformerCache = true Expect(VeleroInstall(context.Background(), &tmpCfgForOldVeleroInstall, false)).To(Succeed()) Expect(CheckVeleroVersion(context.Background(), tmpCfgForOldVeleroInstall.VeleroCLI, diff --git a/test/types.go b/test/types.go index ed00cada62..f4c4180e4f 100644 --- a/test/types.go +++ b/test/types.go @@ -85,8 +85,8 @@ type VeleroConfig struct { StandbyClusterOjbectStoreProvider string DebugVeleroPodRestart bool IsUpgradeTest bool - WithoutDisableInformerCacheParam bool - DisableInformerCache bool + WithoutEnableInformerCacheParam bool + EnableInformerCache bool } type VeleroCfgInPerf struct { diff --git a/test/util/velero/install.go b/test/util/velero/install.go index 42aedceb4e..0963779e37 100644 --- a/test/util/velero/install.go +++ b/test/util/velero/install.go @@ -50,10 +50,10 @@ const ( // we provide more install options other than the standard install.InstallOptions in E2E test type installOptions struct { *install.Options - RegistryCredentialFile string - RestoreHelperImage string - VeleroServerDebugMode bool - WithoutDisableInformerCacheParam bool + RegistryCredentialFile string + RestoreHelperImage string + VeleroServerDebugMode bool + WithoutEnableInformerCacheParam bool } func VeleroInstall(ctx context.Context, veleroCfg *VeleroConfig, isStandbyCluster bool) error { @@ -131,7 +131,7 @@ func VeleroInstall(ctx context.Context, veleroCfg *VeleroConfig, isStandbyCluste veleroInstallOptions.VeleroPodCPURequest = veleroCfg.VeleroPodCPURequest veleroInstallOptions.VeleroPodMemLimit = veleroCfg.VeleroPodMemLimit veleroInstallOptions.VeleroPodMemRequest = veleroCfg.VeleroPodMemRequest - veleroInstallOptions.DisableInformerCache = veleroCfg.DisableInformerCache + veleroInstallOptions.EnableInformerCache = veleroCfg.EnableInformerCache err = installVeleroServer(ctx, veleroCfg.VeleroCLI, veleroCfg.CloudProvider, &installOptions{ Options: veleroInstallOptions, @@ -248,11 +248,11 @@ func installVeleroServer(ctx context.Context, cli, cloudProvider string, options args = append(args, "--plugins", options.Plugins.String()) } - if !options.WithoutDisableInformerCacheParam { - if options.DisableInformerCache { - args = append(args, "--disable-informer-cache=true") + if !options.WithoutEnableInformerCacheParam { + if options.EnableInformerCache { + args = append(args, "--enable-informer-cache=true") } else { - args = append(args, "--disable-informer-cache=false") + args = append(args, "--enable-informer-cache=false") } }