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

Bump Consul version to 1.10.2 #718

Merged
merged 1 commit into from
Sep 14, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -24,7 +24,8 @@ data:
in the UI. */}}
config.json: |-
{
"check_update_interval": "0s"
"check_update_interval": "0s",
"use_streaming_backend": false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this here because it only causes issues when doing federation and consul connect

}
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/consul/test/unit/client-daemonset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ load _helpers
#--------------------------------------------------------------------
# config-configmap

@test "client/DaemonSet: adds config-checksum annotation when extraConfig is blank" {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just re-worded the test titles a bit here because it always adds the config-checksum annotation so really what we're testing is that the checksum changes when the configmap is different

@test "client/DaemonSet: config-checksum annotation when extraConfig is blank" {
cd `chart_dir`
local actual=$(helm template \
-s templates/client-daemonset.yaml \
Expand All @@ -552,7 +552,7 @@ load _helpers
[ "${actual}" = 779a0e24c2ed561c727730698a75b1c552f562c100f0c3315ff2cb925f5e296b ]
}

@test "client/DaemonSet: adds config-checksum annotation when extraConfig is provided" {
@test "client/DaemonSet: config-checksum annotation changes when extraConfig is provided" {
cd `chart_dir`
local actual=$(helm template \
-s templates/client-daemonset.yaml \
Expand All @@ -562,14 +562,14 @@ load _helpers
[ "${actual}" = ba1ceb79d2d18e136d3cc40a9dfddcf2a252aa19ca1703bee3219ca28f1ee187 ]
}

@test "client/DaemonSet: adds config-checksum annotation when client config is updated" {
@test "client/DaemonSet: config-checksum annotation changes when connectInject.enabled=true" {
cd `chart_dir`
local actual=$(helm template \
-s templates/client-daemonset.yaml \
--set 'connectInject.enabled=true' \
. | tee /dev/stderr |
yq -r '.spec.template.metadata.annotations."consul.hashicorp.com/config-checksum"' | tee /dev/stderr)
[ "${actual}" = 8496f6bcdec460eac8a5c890e7899f5757111e13e54808af533aaf205ef18bd0 ]
[ "${actual}" = b45de202f61d7d3b6118c1f47c351d357c2a83af09675f269d3617ae4a65a01c ]
}

#--------------------------------------------------------------------
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