Skip to content

Commit

Permalink
Bump default Consul version to 1.10.2
Browse files Browse the repository at this point in the history
- fix tests that were failing due to a change in how the
DestinationUpstream field is set in Consul OSS vs Enterprise.
- set use_streaming_backend to false for Consul clients because
streaming is not currently supported with mesh gateway federation
  • Loading branch information
lkysow committed Sep 14, 2021
1 parent d12d988 commit 69a166b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ executors:
- image: docker.mirror.hashicorp.services/circleci/golang:1.16
environment:
TEST_RESULTS: /tmp/test-results # path to where test results are saved
CONSUL_VERSION: 1.10.0 # Consul's OSS version to use in tests
CONSUL_ENT_VERSION: 1.10.0+ent # Consul's enterprise version to use in tests
CONSUL_VERSION: 1.10.2 # Consul's OSS version to use in tests
CONSUL_ENT_VERSION: 1.10.2+ent # Consul's enterprise version to use in tests

control-plane-path : &control-plane-path control-plane
acceptance-test-path: &acceptance-test-path charts/consul/test/acceptance
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ IMPROVEMENTS:
* Add support for setting container security contexts on client and server Pods. [[GH-620](https://github.com/hashicorp/consul-k8s/pull/620)]
* Update Envoy image to 1.18.4 [[GH-699](https://github.com/hashicorp/consul-k8s/pull/699)]
* Add configuration for webhook-cert-manager tolerations [[GH-712](https://github.com/hashicorp/consul-k8s/pull/712)]
* Update default Consul version to 1.10.2 [[GH-718](https://github.com/hashicorp/consul-k8s/pull/718)]
* Control Plane
* Add health endpoint to the connect inject webhook that will be healthy when webhook certs are present and not empty. [[GH-626](https://github.com/hashicorp/consul-k8s/pull/626)]
* Catalog Sync: Fix issue registering NodePort services with wrong IPs when a node has multiple IP addresses. [[GH-619](https://github.com/hashicorp/consul-k8s/pull/619)]
* Allow registering the same service in multiple namespaces. [[GH-697](https://github.com/hashicorp/consul-k8s/pull/697)]

BUG FIXES:
* Helm Chart
* Disable [streaming](https://www.consul.io/docs/agent/options#use_streaming_backend) on Consul clients because it is currently not supported when
doing mesh gateway federation. If you wish to enable it, override the setting using `client.extraConfig`:

```yaml
client:
extraConfig: |
{"use_streaming_backend": true}
```
[[GH-718](https://github.com/hashicorp/consul-k8s/pull/718)]
## 0.33.0 (August 12, 2021)
BREAKING CHANGES:
Expand Down
4 changes: 2 additions & 2 deletions charts/consul/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: consul
version: 0.33.0
appVersion: 1.10.0
appVersion: 1.10.2
kubeVersion: ">=1.17.0-0"
description: Official HashiCorp Consul Chart
home: https://www.consul.io
Expand All @@ -13,7 +13,7 @@ annotations:
artifacthub.io/prerelease: false
artifacthub.io/images: |
- name: consul
image: hashicorp/consul:1.10.0
image: hashicorp/consul:1.10.2
- name: consul-k8s-control-plane
image: hashicorp/consul-k8s-control-plane:0.33.0
- name: envoy
Expand Down
2 changes: 1 addition & 1 deletion charts/consul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Detailed installation instructions for Consul on Kubernetes are found [here](htt

$ helm search repo hashicorp/consul
NAME CHART VERSION APP VERSION DESCRIPTION
hashicorp/consul 0.33.0 1.10.0 Official HashiCorp Consul Chart
hashicorp/consul x.xx.x x.xx.x Official HashiCorp Consul Chart

3. Now you're ready to install Consul! To install Consul with the default configuration using Helm 3 run:

Expand Down
3 changes: 2 additions & 1 deletion charts/consul/templates/client-config-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ data:
{{ tpl .Values.client.extraConfig . | trimAll "\"" | indent 4 }}
central-config.json: |-
{
"enable_central_service_config": true
"enable_central_service_config": true,
"use_streaming_backend": false
}
{{- if .Values.connectInject.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ global:
# image: "hashicorp/consul-enterprise:1.10.0-ent"
# ```
# @default: hashicorp/consul:<latest version>
image: "hashicorp/consul:1.10.0"
image: "hashicorp/consul:1.10.2"

# Array of objects containing image pull secret names that will be applied to each service account.
# This can be used to reference image pull secrets if using a custom consul or consul-k8s-control-plane Docker image.
Expand Down
13 changes: 12 additions & 1 deletion control-plane/connect-inject/endpoints_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,20 @@ func TestReconcileCreateEndpoint(t *testing.T) {
require.Equal(t, tt.expectedProxySvcInstances[i].ServiceName, instance.ServiceName)
require.Equal(t, tt.expectedProxySvcInstances[i].ServiceAddress, instance.ServiceAddress)
require.Equal(t, tt.expectedProxySvcInstances[i].ServicePort, instance.ServicePort)
require.Equal(t, tt.expectedProxySvcInstances[i].ServiceProxy, instance.ServiceProxy)
require.Equal(t, tt.expectedProxySvcInstances[i].ServiceMeta, instance.ServiceMeta)
require.Equal(t, tt.expectedProxySvcInstances[i].ServiceTags, instance.ServiceTags)

// When comparing the ServiceProxy field we ignore the DestinationNamespace
// field within that struct because on Consul OSS it's set to "" but on Consul Enterprise
// it's set to "default" and we want to re-use this test for both OSS and Ent.
// This does mean that we don't test that field but that's okay because
// it's not getting set specifically in this test.
// To do the comparison that ignores that field we use go-cmp instead
// of the regular require.Equal call since it supports ignoring certain
// fields.
diff := cmp.Diff(tt.expectedProxySvcInstances[i].ServiceProxy, instance.ServiceProxy,
cmpopts.IgnoreFields(api.Upstream{}, "DestinationNamespace"))
require.Empty(t, diff, "expected objects to be equal")
}

_, checkInfos, err := consulClient.Agent().AgentHealthServiceByName(fmt.Sprintf("%s-sidecar-proxy", tt.consulSvcName))
Expand Down

0 comments on commit 69a166b

Please sign in to comment.