From a9a68e9d733fcc1937a5f820cf292f5257cb2de6 Mon Sep 17 00:00:00 2001 From: Saad Date: Thu, 7 Oct 2021 00:46:27 -0700 Subject: [PATCH] Revert "Acceptance tests fixes (#765)" This reverts commit 0792f7dfd8480aa02f80e3dd45fa7bc67051f9eb. --- .circleci/config.yml | 25 +++++++++++-------- README.md | 2 +- charts/consul/test/terraform/aks/main.tf | 4 +-- charts/consul/test/terraform/eks/main.tf | 8 +++--- charts/consul/test/terraform/eks/variables.tf | 4 +-- charts/consul/test/terraform/gke/main.tf | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c309f2cc64..7f76b6b469 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -449,7 +449,7 @@ jobs: - checkout - install-prereqs - create-kind-clusters: - version: "v1.21.2" + version: "v1.20.7" - restore_cache: keys: - consul-helm-modcache-v2-{{ checksum "charts/consul/test/acceptance/go.mod" }} @@ -481,7 +481,7 @@ jobs: - checkout - install-prereqs - create-kind-clusters: - version: "v1.21.2" + version: "v1.20.7" - restore_cache: keys: - consul-helm-modcache-v2-{{ checksum "charts/consul/test/acceptance/go.mod" }} @@ -561,7 +561,7 @@ jobs: ######################## # ACCEPTANCE TESTS ######################## - acceptance-gke-1-19: + acceptance-gke-1-17: environment: - TEST_RESULTS: /tmp/test-results docker: @@ -627,7 +627,7 @@ jobs: fail_only: true failure_message: "GKE acceptance tests failed. Check the logs at: ${CIRCLE_BUILD_URL}" - acceptance-aks-1-20: + acceptance-aks-1-19: environment: - TEST_RESULTS: /tmp/test-results docker: @@ -717,6 +717,11 @@ jobs: echo "export primary_kubeconfig=$primary_kubeconfig" >> $BASH_ENV echo "export secondary_kubeconfig=$secondary_kubeconfig" >> $BASH_ENV + # Change file permissions of the kubecofig files to avoid warnings by helm. + # TODO: remove when https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1114 is merged. + chmod 600 "$primary_kubeconfig" + chmod 600 "$secondary_kubeconfig" + # Restore go module cache if there is one - restore_cache: keys: @@ -796,7 +801,7 @@ jobs: fail_only: true failure_message: "OpenShift acceptance tests failed. Check the logs at: ${CIRCLE_BUILD_URL}" - acceptance-kind-1-22: + acceptance-kind-1-21: environment: - TEST_RESULTS: /tmp/test-results machine: @@ -806,7 +811,7 @@ jobs: - checkout - install-prereqs - create-kind-clusters: - version: "v1.22.1" + version: "v1.21.1" - restore_cache: keys: - consul-helm-modcache-v2-{{ checksum "charts/consul/test/acceptance/go.mod" }} @@ -827,7 +832,7 @@ jobs: path: /tmp/test-results - slack/status: fail_only: true - failure_message: "Acceptance tests against Kind with Kubernetes v1.22 failed. Check the logs at: ${CIRCLE_BUILD_URL}" + failure_message: "Acceptance tests against Kind with Kubernetes v1.21 failed. Check the logs at: ${CIRCLE_BUILD_URL}" update-helm-charts-index: docker: @@ -942,16 +947,16 @@ workflows: # - acceptance-openshift: # requires: # - cleanup-azure-resources - - acceptance-gke-1-19: + - acceptance-gke-1-17: requires: - cleanup-gcp-resources - acceptance-eks-1-18: requires: - cleanup-eks-resources - - acceptance-aks-1-20: + - acceptance-aks-1-19: requires: - cleanup-azure-resources - - acceptance-kind-1-22 + - acceptance-kind-1-21 # update-helm-charts-index: <-- Disable until we can figure out a release workflow. We currently don't want it to trigger on a tag because the tag is pushed by the eco-releases pipeline. # jobs: # - helm-chart-pipeline-approval: diff --git a/README.md b/README.md index cc5b1985c2..34c00c052a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ use Consul with Kubernetes, please see the ### Prerequisites * **Helm 3.0+** (Helm 2 is not supported) - * **Kubernetes 1.18+** - This is the earliest version of Kubernetes tested. + * **Kubernetes 1.17+** - This is the earliest version of Kubernetes tested. It is possible that this chart works with earlier versions but it is untested. diff --git a/charts/consul/test/terraform/aks/main.tf b/charts/consul/test/terraform/aks/main.tf index 774b94b68c..0406afd0b2 100644 --- a/charts/consul/test/terraform/aks/main.tf +++ b/charts/consul/test/terraform/aks/main.tf @@ -1,5 +1,5 @@ provider "azurerm" { - version = "2.78.0" + version = "~> 2.0" features {} } @@ -24,7 +24,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.20.9" + kubernetes_version = "1.19.13" default_node_pool { name = "default" diff --git a/charts/consul/test/terraform/eks/main.tf b/charts/consul/test/terraform/eks/main.tf index 3aa79db821..b16646af33 100644 --- a/charts/consul/test/terraform/eks/main.tf +++ b/charts/consul/test/terraform/eks/main.tf @@ -51,7 +51,7 @@ module "eks" { count = var.cluster_count source = "terraform-aws-modules/eks/aws" - version = "17.20.0" + version = "12.2.0" cluster_name = "consul-k8s-${random_id.suffix[count.index].dec}" cluster_version = "1.18" @@ -69,9 +69,9 @@ module "eks" { } } - manage_aws_auth = false - write_kubeconfig = true - kubeconfig_output_path = pathexpand("~/.kube/consul-k8s-${random_id.suffix[count.index].dec}") + manage_aws_auth = false + write_kubeconfig = true + config_output_path = pathexpand("~/.kube/consul-k8s-${random_id.suffix[count.index].dec}") tags = var.tags } diff --git a/charts/consul/test/terraform/eks/variables.tf b/charts/consul/test/terraform/eks/variables.tf index cab209fda0..a401312a45 100644 --- a/charts/consul/test/terraform/eks/variables.tf +++ b/charts/consul/test/terraform/eks/variables.tf @@ -14,7 +14,7 @@ variable "role_arn" { } variable "tags" { - type = map - default = {} + type = map + default = {} description = "Tags to attach to the created resources." } diff --git a/charts/consul/test/terraform/gke/main.tf b/charts/consul/test/terraform/gke/main.tf index 8f86ad1290..a6c294e2e6 100644 --- a/charts/consul/test/terraform/gke/main.tf +++ b/charts/consul/test/terraform/gke/main.tf @@ -10,7 +10,7 @@ resource "random_id" "suffix" { data "google_container_engine_versions" "main" { location = var.zone - version_prefix = "1.19." + version_prefix = "1.17." } resource "google_container_cluster" "cluster" {