Skip to content

Commit

Permalink
Skip peering tests on AKS and update AKS version (#1355)
Browse files Browse the repository at this point in the history
* On AKS, we cannot run peering tests yet because the pod network is not flat
* Add a flag to acceptance tests framework to disable peering tests (to be removed once non-flat networks are supported)
* Update AKS version to the supported 1.21.x version (1.21.7 is no longer supported)
* Run AKS nightly acceptance tests with -disable-peering flag
  • Loading branch information
ishustava authored Jul 19, 2022
1 parent eaa82b3 commit 3f5e94d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions acceptance/framework/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type TestConfig struct {

EnableTransparentProxy bool

DisablePeering bool

ConsulImage string
ConsulK8SImage string
ConsulVersion *version.Version
Expand Down
6 changes: 6 additions & 0 deletions acceptance/framework/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type TestFlags struct {

flagUseKind bool

flagDisablePeering bool

once sync.Once
}

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -140,6 +144,8 @@ func (t *TestFlags) TestConfigFromFlags() *config.TestConfig {

EnableTransparentProxy: t.flagEnableTransparentProxy,

DisablePeering: t.flagDisablePeering,

ConsulImage: t.flagConsulImage,
ConsulK8SImage: t.flagConsulK8sImage,
ConsulVersion: consulVersion,
Expand Down
4 changes: 2 additions & 2 deletions acceptance/tests/peering/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion charts/consul/test/terraform/aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f5e94d

Please sign in to comment.