diff --git a/.circleci/config.yml b/.circleci/config.yml index a28ec66add..3f48eb9055 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -701,7 +701,7 @@ jobs: - run: mkdir -p $TEST_RESULTS - run-acceptance-tests: - additional-flags: -kubeconfig="$primary_kubeconfig" -secondary-kubeconfig="$secondary_kubeconfig" + additional-flags: -kubeconfig="$primary_kubeconfig" -secondary-kubeconfig="$secondary_kubeconfig" -disable-peering - store_test_results: path: /tmp/test-results diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 351e97a28c..20c4a322da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -255,6 +255,7 @@ jobs: bin_name: consul-k8s-control-plane workdir: control-plane redhat_tag: scan.connect.redhat.com/ospid-611ca2f89a9b407267837100/consul-k8s-control-plane:${{env.version}}-ubi + tags: docker.io/hashicorp/${{ env.repo }}-control-plane:${{ env.version }}-ubi dev_tags: | hashicorppreview/${{ env.repo }}-control-plane:${{ env.version }}-ubi docker.io/hashicorppreview/${{ env.repo }}-control-plane:${{ env.version }}-ubi-${{ github.sha }} diff --git a/acceptance/framework/config/config.go b/acceptance/framework/config/config.go index 1bda173025..62fd094a33 100644 --- a/acceptance/framework/config/config.go +++ b/acceptance/framework/config/config.go @@ -40,6 +40,8 @@ type TestConfig struct { EnableTransparentProxy bool + DisablePeering bool + ConsulImage string ConsulK8SImage string ConsulVersion *version.Version diff --git a/acceptance/framework/flags/flags.go b/acceptance/framework/flags/flags.go index 6565c2413d..b275bb0904 100644 --- a/acceptance/framework/flags/flags.go +++ b/acceptance/framework/flags/flags.go @@ -40,6 +40,8 @@ type TestFlags struct { flagUseKind bool + flagDisablePeering bool + once sync.Once } @@ -96,6 +98,8 @@ func (t *TestFlags) init() { flag.BoolVar(&t.flagUseKind, "use-kind", false, "If true, the tests will assume they are running against a local kind cluster(s).") + flag.BoolVar(&t.flagDisablePeering, "disable-peering", false, + "If true, the peering tests will not run.") if t.flagEnterpriseLicense == "" { t.flagEnterpriseLicense = os.Getenv("CONSUL_ENT_LICENSE") @@ -140,6 +144,8 @@ func (t *TestFlags) TestConfigFromFlags() *config.TestConfig { EnableTransparentProxy: t.flagEnableTransparentProxy, + DisablePeering: t.flagDisablePeering, + ConsulImage: t.flagConsulImage, ConsulK8SImage: t.flagConsulK8sImage, ConsulVersion: consulVersion, diff --git a/acceptance/tests/peering/main_test.go b/acceptance/tests/peering/main_test.go index fff59f1e70..12bb35afd5 100644 --- a/acceptance/tests/peering/main_test.go +++ b/acceptance/tests/peering/main_test.go @@ -13,10 +13,10 @@ var suite testsuite.Suite func TestMain(m *testing.M) { suite = testsuite.NewSuite(m) - if suite.Config().EnableMultiCluster { + if suite.Config().EnableMultiCluster && !suite.Config().DisablePeering { os.Exit(suite.Run()) } else { - fmt.Println("Skipping peering tests because -enable-multi-cluster is not set") + fmt.Println("Skipping peering tests because either -enable-multi-cluster is not set or -disable-peering is set") os.Exit(0) } } diff --git a/charts/consul/test/terraform/aks/main.tf b/charts/consul/test/terraform/aks/main.tf index e12ad64cf9..57de5d2a54 100644 --- a/charts/consul/test/terraform/aks/main.tf +++ b/charts/consul/test/terraform/aks/main.tf @@ -45,7 +45,7 @@ resource "azurerm_kubernetes_cluster" "default" { location = azurerm_resource_group.default[count.index].location resource_group_name = azurerm_resource_group.default[count.index].name dns_prefix = "consul-k8s-${random_id.suffix[count.index].dec}" - kubernetes_version = "1.21.7" + kubernetes_version = "1.21.14" // We're setting the network plugin and other network properties explicitly // here even though they are the same as defaults to ensure that none of these CIDRs