diff --git a/e2e/Makefile b/e2e/Makefile index 358f3c57a..bfd5c9a6e 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -8,6 +8,7 @@ compile: TIMEOUT?=168h NAMESPACE?= +PREFIX?= CONTEXT?= FDB_VERSION?=7.1.31 PREVIOUS_FDB_VERSION?=6.3.25 @@ -108,6 +109,7 @@ nightly-tests: run --ginkgo.timeout=$(TIMEOUT) \ --timeout=$(TIMEOUT) \ --namespace="$(NAMESPACE)" \ + --prefix="$(PREFIX)" \ --context="$(CONTEXT)" \ --fdb-image="$(FDB_IMAGE)" \ --sidecar-image="$(SIDECAR_IMAGE)" \ diff --git a/e2e/fixtures/factory.go b/e2e/fixtures/factory.go index 5f8547af1..e9d5e6e9b 100644 --- a/e2e/fixtures/factory.go +++ b/e2e/fixtures/factory.go @@ -250,9 +250,12 @@ func (factory *Factory) getContainerOverrides( return mainOverrides, sidecarOverrides } -// getClusterPrefix returns the cluster name prefix. func (factory *Factory) getClusterPrefix() string { - return fmt.Sprintf("fdb-cluster-%s", RandStringRunes(8)) + prefix := factory.options.prefix + if prefix == "" { + return fmt.Sprintf("fdb-cluster-%s", RandStringRunes(8)) + } + return prefix } // GetDefaultStorageClass returns either the StorageClass provided by the command line or fetches the StorageClass passed on diff --git a/e2e/fixtures/options.go b/e2e/fixtures/options.go index 27a8d42a6..f96635d9c 100644 --- a/e2e/fixtures/options.go +++ b/e2e/fixtures/options.go @@ -33,6 +33,7 @@ import ( type FactoryOptions struct { namespace string chaosNamespace string + prefix string context string fdbImage string // TODO (johscheuer): Make this optional if we use the default sidecarImage string // TODO (johscheuer): Make this optional if we use the default @@ -65,6 +66,12 @@ func (options *FactoryOptions) BindFlags(fs *flag.FlagSet) { "", "defines the chaos namespace to run experiments (will be created if missing)", ) + fs.StringVar( + &options.prefix, + "prefix", + "", + "defines the prefix of fdb cluster to run the test (will be created if missing)", + ) fs.StringVar( &options.context, "context",