Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 56 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,9 @@ jobs:
acceptance-kind-1-23-consul-nightly-1-11:
environment:
- TEST_RESULTS: /tmp/test-results
- CONSUL_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul:1.11-dev"
- ENVOY_IMAGE: "envoyproxy/envoy:1.20.2"
- CONSUL_K8S_IMAGE: "docker.mirror.hashicorp.services/hashicorp/consul-k8s-control-plane:0.44.0"
- CONSUL_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul-enterprise:1.11-dev"
- ENVOY_IMAGE: "envoyproxy/envoy:v1.20.2"
- CONSUL_K8S_IMAGE: "docker.mirror.hashicorp.services/hashicorp/consul-k8s-control-plane:0.45.0"
machine:
image: ubuntu-2004:202010-01
resource_class: xlarge
Expand All @@ -893,7 +893,7 @@ jobs:
- ~/.go_workspace/pkg/mod
- run: mkdir -p $TEST_RESULTS
- run-acceptance-tests:
additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -consul-k8s-image=$CONSUL_K8S_IMAGE -consul-image=$CONSUL_IMAGE -consul-version="1.11-dev" -envoy-image=$ENVOY_IMAGE
additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -consul-k8s-image=$CONSUL_K8S_IMAGE -consul-image=$CONSUL_IMAGE -consul-version="1.11" -envoy-image=$ENVOY_IMAGE
- store_test_results:
path: /tmp/test-results
- store_artifacts:
Expand All @@ -905,9 +905,9 @@ jobs:
acceptance-kind-1-23-consul-nightly-1-12:
environment:
- TEST_RESULTS: /tmp/test-results
- CONSUL_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul:1.12-dev"
- ENVOY_IMAGE: "envoyproxy/envoy:1.22.2"
- CONSUL_K8S_IMAGE: "docker.mirror.hashicorp.services/hashicorp/consul-k8s-control-plane:0.44.0"
- CONSUL_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul-enterprise:1.12-dev"
- ENVOY_IMAGE: "envoyproxy/envoy:v1.22.2"
- CONSUL_K8S_IMAGE: "docker.mirror.hashicorp.services/hashicorp/consul-k8s-control-plane:0.45.0"
machine:
image: ubuntu-2004:202010-01
resource_class: xlarge
Expand All @@ -929,7 +929,7 @@ jobs:
- ~/.go_workspace/pkg/mod
- run: mkdir -p $TEST_RESULTS
- run-acceptance-tests:
additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -consul-k8s-image=$CONSUL_K8S_IMAGE -consul-image=$CONSUL_IMAGE -consul-version="1.12-dev" -envoy-image=$ENVOY_IMAGE
additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -consul-k8s-image=$CONSUL_K8S_IMAGE -consul-image=$CONSUL_IMAGE -consul-version="1.12" -envoy-image=$ENVOY_IMAGE
- store_test_results:
path: /tmp/test-results
- store_artifacts:
Expand All @@ -938,6 +938,42 @@ jobs:
fail_only: true
failure_message: "Acceptance tests against Kind with Kubernetes v1.23 with Consul 1.12 nightly failed. Check the logs at: ${CIRCLE_BUILD_URL}"

acceptance-kind-1-23-consul-nightly-1-13:
environment:
- TEST_RESULTS: /tmp/test-results
- CONSUL_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul-enterprise:1.13-dev"
- ENVOY_IMAGE: "envoyproxy/envoy:v1.22.2"
- CONSUL_K8S_IMAGE: "docker.mirror.hashicorp.services/hashicorp/consul-k8s-control-plane:0.45.0"
machine:
image: ubuntu-2004:202010-01
resource_class: xlarge
steps:
- checkout
- install-prereqs
- create-kind-clusters:
version: "v1.23.0"
- restore_cache:
keys:
- consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }}
- run:
name: go mod download
working_directory: *acceptance-mod-path
command: go mod download
- save_cache:
key: consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }}
paths:
- ~/.go_workspace/pkg/mod
- run: mkdir -p $TEST_RESULTS
- run-acceptance-tests:
additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -consul-k8s-image=$CONSUL_K8S_IMAGE -consul-image=$CONSUL_IMAGE -consul-version="1.13" -envoy-image=$ENVOY_IMAGE
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
- slack/status:
fail_only: true
failure_message: "Acceptance tests against Kind with Kubernetes v1.23 with Consul 1.13 nightly failed. Check the logs at: ${CIRCLE_BUILD_URL}"

workflows:
version: 2
test-and-build:
Expand Down Expand Up @@ -1002,14 +1038,15 @@ workflows:
requires:
- dev-upload-docker

nightly-acceptance-tests-consul:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- main
jobs:
- acceptance-kind-1-23-consul-nightly-1-11
- acceptance-kind-1-23-consul-nightly-1-12
# nightly-acceptance-tests-consul:
# triggers:
# - schedule:
# cron: "0 0 * * *"
# filters:
# branches:
# only:
# - main
# jobs:
# - acceptance-kind-1-23-consul-nightly-1-11
# - acceptance-kind-1-23-consul-nightly-1-12
# - acceptance-kind-1-23-consul-nightly-1-13
7 changes: 7 additions & 0 deletions acceptance/tests/peering/peering_connect_namespaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package peering

import (
"context"
"github.com/hashicorp/go-version"
"strconv"
"testing"

Expand Down Expand Up @@ -34,6 +35,12 @@ func TestPeering_ConnectNamespaces(t *testing.T) {
t.Skipf("skipping this test because Transparent Proxy is enabled")
}

ver, err := version.NewVersion("1.13.0")
require.NoError(t, err)
if cfg.ConsulVersion != nil && cfg.ConsulVersion.LessThan(ver) {
t.Skipf("skipping this test because peering is not supported in version %v", cfg.ConsulVersion.String())
}

const staticServerPeer = "server"
const staticClientPeer = "client"
const defaultNamespace = "default"
Expand Down
7 changes: 7 additions & 0 deletions acceptance/tests/peering/peering_connect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package peering

import (
"context"
"github.com/hashicorp/go-version"
"strconv"
"testing"

Expand All @@ -25,6 +26,12 @@ func TestPeering_Connect(t *testing.T) {
t.Skipf("skipping this test because Transparent Proxy is enabled")
}

ver, err := version.NewVersion("1.13.0")
require.NoError(t, err)
if cfg.ConsulVersion != nil && cfg.ConsulVersion.LessThan(ver) {
t.Skipf("skipping this test because peering is not supported in version %v", cfg.ConsulVersion.String())
}

const staticServerPeer = "server"
const staticClientPeer = "client"
cases := []struct {
Expand Down