Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of update service config crds, update passive health check into release/0.49.x #1559

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
164acff
Prepare main for next release (1.0.0)
curtbushko Sep 27, 2022
d462100
CNI: Add support for OpenShift and Multus (#1527)
curtbushko Sep 27, 2022
1d0d40a
Allow the API Gateway controller to create and update Secrets (#1542)
nathancoleman Sep 28, 2022
cf7588b
README: bump Helm CLI requirement to 3.6+ (#1545)
Sep 28, 2022
168ccba
bug: provide new grpc TLS auto-encrypt config (#1541)
ishustava Sep 28, 2022
dc6e11b
added squash merge method to backport (#1549)
wilkermichael Sep 28, 2022
8404aec
Initial support for agentless (#1267)
ishustava Jun 24, 2022
bb14499
Enable connect-injector to talk to external servers. (#1323)
ishustava Jul 7, 2022
3364122
Enable CRD controller to talk to Consul servers (#1326)
ishustava Jul 7, 2022
766bc67
Fix failing unit tests after rebasing Cluster Peering (#1428)
Aug 16, 2022
bbb4a0a
agentless: allow providing custom http port for connect-inject-init c…
ishustava Aug 29, 2022
4f4c368
agentless: initial integration with consul-dataplane (#1470)
ishustava Sep 6, 2022
42fabd0
Register mesh-gateways using the endpoints controller. (#1464)
Sep 21, 2022
5caacd4
Migrate all server GRPC ports to 8502 (#1522)
Sep 22, 2022
6dbfa33
agentless: integrate connect-inject with consul-server-connection-man…
ishustava Sep 23, 2022
2317822
Register Terminating Gateways with Endpoints Controller (#1469)
Sep 26, 2022
6f43a1a
agentless: integrate consul-server-connection-manager to connect-init…
ishustava Sep 26, 2022
7cce9fb
rebasing conflicts
jmurret Sep 27, 2022
db63dc0
agentless: enable admin partitions with agentless (#1543)
ishustava Sep 27, 2022
411086c
Register Ingress Gateway with Endpoints Controller (#1544)
Sep 28, 2022
583008a
Use Consul Dataplane for Terminating Gateways (#1534)
Sep 28, 2022
b7f834c
Helm 3.9.4 (#1547)
jmurret Sep 28, 2022
cad7d10
Install gke-gcloud-auth-plugin into acceptance test image to fix warn…
jmurret Sep 28, 2022
76bc609
update service config crds, update passive health check (#1484)
Sep 29, 2022
1a9a8b3
Initial 0.49.0 branch creation
curtbushko Sep 27, 2022
024728d
backport of commit b3fcc2876a6fd82457089e114c4140168aa1d9db
nathancoleman Sep 27, 2022
51d0321
backport of commit 5d07c8dc43d4d123fbc731d62991b827937c1409
nathancoleman Sep 27, 2022
141d012
backport of commit 65322a1eb520590854c1611da6e318f293be0899
Sep 6, 2022
5b47859
backport of commit 0f3622c937d15f933db8002a79a0dffc67c45ef0
Sep 13, 2022
64c1971
backport of commit 3112e09cb11582cddef5842b0702281bd03ca5d2
Sep 13, 2022
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
47 changes: 25 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ commands:
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

wget https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz
tar -zxvf helm-v3.7.0-linux-amd64.tar.gz
wget https://get.helm.sh/helm-v3.9.4-linux-amd64.tar.gz
tar -zxvf helm-v3.9.4-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
create-kind-clusters:
parameters:
Expand Down Expand Up @@ -110,9 +110,10 @@ commands:
do
if ! gotestsum --no-summary=all --jsonfile=jsonfile-${pkg////-} -- $pkg -p 1 -timeout 2h -failfast \
<< parameters.additional-flags >> \
${ENABLE_ENTERPRISE:+-enable-enterprise} \
-enable-multi-cluster \
${ENABLE_ENTERPRISE:+-enable-enterprise} \
-debug-directory="$TEST_RESULTS/debug" \
-consul-image=hashicorppreview/consul-enterprise:1.14-dev \
-consul-k8s-image=<< parameters.consul-k8s-image >>
then
echo "Tests in ${pkg} failed, aborting early"
Expand Down Expand Up @@ -485,7 +486,7 @@ jobs:

unit-test-helm-templates:
docker:
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -596,7 +597,7 @@ jobs:
##########################
cleanup-gcp-resources:
docker:
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0
steps:
- run:
name: cleanup leftover resources
Expand All @@ -614,7 +615,7 @@ jobs:

cleanup-azure-resources:
docker:
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0
steps:
- run:
name: cleanup leftover resources
Expand All @@ -632,7 +633,7 @@ jobs:

cleanup-eks-resources:
docker:
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0
steps:
- checkout
- run:
Expand All @@ -657,9 +658,10 @@ jobs:
parallelism: 2
environment:
- TEST_RESULTS: /tmp/test-results
- USE_GKE_GCLOUD_AUTH_PLUGIN: true
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- run:
Expand Down Expand Up @@ -725,9 +727,10 @@ jobs:
parallelism: 2
environment:
- TEST_RESULTS: /tmp/test-results
- USE_GKE_GCLOUD_AUTH_PLUGIN: true
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- run:
Expand Down Expand Up @@ -795,7 +798,7 @@ jobs:
- TEST_RESULTS: /tmp/test-results
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -852,7 +855,7 @@ jobs:
- TEST_RESULTS: /tmp/test-results
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -908,7 +911,7 @@ jobs:
- TEST_RESULTS: /tmp/test-results
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -971,7 +974,7 @@ jobs:
- TEST_RESULTS: /tmp/test-results
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -1034,7 +1037,7 @@ jobs:
parallelism: 1
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.12.0
- image: docker.mirror.hashicorp.services/hashicorpdev/consul-helm-test:0.14.0

steps:
- checkout
Expand Down Expand Up @@ -1217,14 +1220,14 @@ workflows:
context: consul-ci
requires:
- dev-upload-docker
- acceptance-tproxy-cni:
context: consul-ci
requires:
- dev-upload-docker
- acceptance-tproxy:
context: consul-ci
requires:
- dev-upload-docker
# - acceptance-tproxy-cni:
# context: consul-ci
# requires:
# - dev-upload-docker
# - acceptance-tproxy:
# context: consul-ci
# requires:
# - dev-upload-docker
nightly-acceptance-tests:
triggers:
- schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
container: hashicorpdev/backport-assistant:0.2.5
steps:
- name: Run Backport Assistant
run: backport-assistant backport -automerge
run: backport-assistant backport -automerge -merge-method=squash
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+\\.x)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}"
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
## UNRELEASED
## 0.49.0 (September 29, 2022)

FEATURES:
* CLI:
* Add support for tab autocompletion [[GH-1437](https://github.com/hashicorp/consul-k8s/pull/1501)]
* Consul CNI Plugin
* Support for OpenShift and Multus CNI plugin [[GH-1527](https://github.com/hashicorp/consul-k8s/pull/1527)]

BUG FIXES:
* Control plane
* Use global ACL auth method to provision ACL tokens for API Gateway in secondary datacenter [[GH-1481](https://github.com/hashicorp/consul-k8s/pull/1481)]
* Peering: pass new `use_auto_cert` value to gRPC TLS config when auto-encrypt is enabled. [[GH-1541](https://github.com/hashicorp/consul-k8s/pull/1541)]
* Helm:
* Only create Federation Secret Job when server.updatePartition is 0 [[GH-1512](https://github.com/hashicorp/consul-k8s/pull/1512)]
* Fixes a typo in the templating of `global.connectInject.disruptionBudget.maxUnavailable`. [[GH-1530](https://github.com/hashicorp/consul-k8s/pull/1530)]

IMPROVEMENTS:
* Helm:
* API Gateway: Set primary datacenter flag when deploying controller into secondary datacenter with federation enabled [[GH-1511](https://github.com/hashicorp/consul-k8s/pull/1511)]
* API Gateway: Allow controller to create and update Secrets for storing Consul CA cert alongside gateway Deployments [[GH-1542](https://github.com/hashicorp/consul-k8s/pull/1542)]
* Control-plane:
* Support escaped commas in service tag annotations for pods which use `consul.hashicorp.com/connect-service-tags` or `consul.hashicorp.com/service-tags`. [[GH-1532](https://github.com/hashicorp/consul-k8s/pull/1532)]

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ func TestExample(t *testing.T) {
}
```

Please see [mesh gateway tests](acceptance/tests/mesh-gateway/mesh_gateway_test.go)
Please see [wan federation tests](acceptance/tests/wan-federation/wan_federation_test.go)
for an example of how to use write a test that uses multiple contexts.

#### Writing Assertions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ use Consul with Kubernetes, please see the
[Consul and Kubernetes documentation](https://www.consul.io/docs/platform/k8s/index.html).

### Prerequisites
* **Helm 3.2+** (Helm 2 is not supported)
* **Helm 3.6+**
* **Kubernetes 1.21-1.24** - This is the earliest version of Kubernetes tested.
It is possible that this chart works with earlier versions, but it is
untested.
Expand Down
13 changes: 9 additions & 4 deletions acceptance/framework/consul/helm_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ type HelmCluster struct {
// a bootstrap token from a Kubernetes secret stored in the cluster.
ACLToken string

// SkipCheckForPreviousInstallations is a toggle for skipping the check
// if there are any previous installations of this Helm chart in the cluster.
SkipCheckForPreviousInstallations bool

ctx environment.TestContext
helmOptions *helm.Options
releaseName string
Expand Down Expand Up @@ -109,7 +113,9 @@ func (h *HelmCluster) Create(t *testing.T) {
})

// Fail if there are any existing installations of the Helm chart.
helpers.CheckForPriorInstallations(t, h.kubernetesClient, h.helmOptions, "consul-helm", "chart=consul-helm")
if !h.SkipCheckForPreviousInstallations {
helpers.CheckForPriorInstallations(t, h.kubernetesClient, h.helmOptions, "consul-helm", "chart=consul-helm")
}

chartName := config.HelmChartPath
if h.helmOptions.Version != config.HelmChartPath {
Expand Down Expand Up @@ -565,9 +571,8 @@ func configureSCCs(t *testing.T, client kubernetes.Interface, cfg *config.TestCo

func defaultValues() map[string]string {
values := map[string]string{
"server.replicas": "1",
"connectInject.envoyExtraArgs": "--log-level debug",
"connectInject.logLevel": "debug",
"global.logLevel": "debug",
"server.replicas": "1",
// Disable DNS since enabling it changes the policy for the anonymous token,
// which could result in tests passing due to that token having privileges to read services
// (false positive).
Expand Down
47 changes: 22 additions & 25 deletions acceptance/framework/consul/helm_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,38 @@ func TestNewHelmCluster(t *testing.T) {
name: "defaults are used when no helmValues are set",
helmValues: map[string]string{},
want: map[string]string{
"global.image": "test-config-image",
"server.replicas": "1",
"connectInject.envoyExtraArgs": "--log-level debug",
"connectInject.logLevel": "debug",
"global.image": "test-config-image",
"global.logLevel": "debug",
"server.replicas": "1",
"connectInject.transparentProxy.defaultEnabled": "false",
"dns.enabled": "false",
"server.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"client.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"dns.enabled": "false",
"server.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"client.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
},
},
{
name: "when using helmValues, defaults are overridden",
helmValues: map[string]string{
"global.image": "test-image",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.envoyExtraArgs": "--foo",
"connectInject.logLevel": "debug",
"global.image": "test-image",
"global.logLevel": "debug",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.transparentProxy.defaultEnabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
},
want: map[string]string{
"global.image": "test-image",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.envoyExtraArgs": "--foo",
"connectInject.logLevel": "debug",
"global.image": "test-image",
"global.logLevel": "debug",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.transparentProxy.defaultEnabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
},
},
}
Expand Down
3 changes: 0 additions & 3 deletions acceptance/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,8 @@ github.com/gruntwork-io/terratest v0.31.2 h1:xvYHA80MUq5kx670dM18HInewOrrQrAN+Xb
github.com/gruntwork-io/terratest v0.31.2/go.mod h1:EEgJie28gX/4AD71IFqgMj6e99KP5mi81hEtzmDjxTo=
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20211207212234-aea9efea5638 h1:z68s6H6O3RjxDmNvou/2/3UBrsJkrMcNzI0IQN5scAM=
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20211207212234-aea9efea5638/go.mod h1:7ZeaiADGbvJDuoWAT8UKj6KCcLsFUk+34OkUGMVtdXg=
github.com/hashicorp/consul/api v1.10.1-0.20220726130109-a6a79d6811df h1:CCh336XUGPaMNqMkzRAeEL0BFin7LhX729xy3IxE5Y4=
github.com/hashicorp/consul/api v1.10.1-0.20220726130109-a6a79d6811df/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ=
github.com/hashicorp/consul/api v1.14.0 h1:Y64GIJ8hYTu+tuGekwO4G4ardXoiCivX9wv1iP/kihk=
github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ=
github.com/hashicorp/consul/sdk v0.10.0 h1:rGLEh2AWK4K0KCMvqWAz2EYxQqgciIfMagWZ0nVe5MI=
github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw=
github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4=
github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw=
Expand Down
Loading