diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cc9473115..f8dca9fcf 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -79,7 +79,8 @@ jobs: --image-replacements workspace/just.containerlookup \ --namespace-file workspace/e2e.namespace \ --platform ${{ inputs.platform }} \ - --skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" + --skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" \ + --namespace-suffix="-ci" - name: Download logs if: always() run: | diff --git a/.github/workflows/e2e_aks_runtime.yml b/.github/workflows/e2e_aks_runtime.yml index 4b3d10d15..54ee53995 100644 --- a/.github/workflows/e2e_aks_runtime.yml +++ b/.github/workflows/e2e_aks_runtime.yml @@ -87,7 +87,8 @@ jobs: --image-replacements workspace/just.containerlookup \ --namespace-file workspace/e2e.namespace \ --platform AKS-CLH-SNP \ - --skip-undeploy="false" + --skip-undeploy="false" \ + --namespace-suffix="-ci" - name: Download logs if: always() run: | diff --git a/e2e/aks-runtime/aks_runtime_test.go b/e2e/aks-runtime/aks_runtime_test.go index 04ef2fa34..6738d8492 100644 --- a/e2e/aks-runtime/aks_runtime_test.go +++ b/e2e/aks-runtime/aks_runtime_test.go @@ -34,7 +34,7 @@ func TestAKSRuntime(t *testing.T) { require.NoError(err) imageReplacements, err := kuberesource.ImageReplacementsFromFile(f) require.NoError(err) - namespace := contrasttest.MakeNamespace(t) + namespace := contrasttest.MakeNamespace(t, contrasttest.Flags.NamespaceSuffix) // Log versions kataPolicyGenV, err := az.KataPolicyGenVersion() diff --git a/e2e/internal/contrasttest/contrasttest.go b/e2e/internal/contrasttest/contrasttest.go index be250608c..50b520a3e 100644 --- a/e2e/internal/contrasttest/contrasttest.go +++ b/e2e/internal/contrasttest/contrasttest.go @@ -40,6 +40,7 @@ type testFlags struct { PlatformStr string ImageReplacementsFile string NamespaceFile string + NamespaceSuffix string SkipUndeploy bool } @@ -47,6 +48,7 @@ type testFlags struct { func RegisterFlags() { flag.StringVar(&Flags.ImageReplacementsFile, "image-replacements", "", "path to image replacements file") flag.StringVar(&Flags.NamespaceFile, "namespace-file", "", "file to store the namespace in") + flag.StringVar(&Flags.NamespaceSuffix, "namespace-suffix", "", "suffix to append to the namespace") flag.StringVar(&Flags.PlatformStr, "platform", "", "Deployment platform") flag.BoolVar(&Flags.SkipUndeploy, "skip-undeploy", false, "Skip undeploying the test namespace") } diff --git a/justfile b/justfile index 58e10e903..58642fd54 100644 --- a/justfile +++ b/justfile @@ -72,7 +72,8 @@ e2e target=default_deploy_target platform=default_platform: soft-clean coordinat --image-replacements ./{{ workspace_dir }}/just.containerlookup \ --namespace-file ./{{ workspace_dir }}/just.namespace \ --platform {{ platform }} \ - --skip-undeploy=true + --skip-undeploy=true \ + --namespace-suffix=${namespace_suffix-} # Generate policies, apply Kubernetes manifests. deploy target=default_deploy_target cli=default_cli platform=default_platform: (runtime target platform) (apply "runtime") (populate target platform) (generate cli platform) (apply target)