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

remove deprecated annotations in server-service template #1619

Merged
merged 5 commits into from
Oct 17, 2022
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## UNRELEASED

IMPROVEMENTS:
* Helm:
* Remove deprecated annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"` in the `server-service` template. [[GH-1619](https://github.com/hashicorp/consul-k8s/pull/1619)]
* Support `minAvailable` on connect injector `PodDisruptionBudget`. [[GH-1557](https://github.com/hashicorp/consul-k8s/pull/1557)]

## 1.0.0-beta3 (October 12, 2022)
Expand Down
4 changes: 0 additions & 4 deletions charts/consul/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ metadata:
{{- if .Values.server.service.annotations }}
{{ tpl .Values.server.service.annotations . | nindent 4 | trim }}
{{- end }}
# This must be set in addition to publishNotReadyAddresses due
# to an open issue where it may not work:
# https://github.com/kubernetes/kubernetes/issues/58662
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None
# We want the servers to become available even if they're not ready
Expand Down
9 changes: 2 additions & 7 deletions charts/consul/test/unit/server-service.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ load _helpers
# this is such an important part of making everything work we verify it here.
@test "server/Service: tolerates unready endpoints" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-service.yaml \
. | tee /dev/stderr |
yq -r '.metadata.annotations["service.alpha.kubernetes.io/tolerate-unready-endpoints"]' | tee /dev/stderr)
[ "${actual}" = "true" ]

local actual=$(helm template \
-s templates/server-service.yaml \
Expand Down Expand Up @@ -103,13 +98,13 @@ load _helpers
#--------------------------------------------------------------------
# annotations

@test "server/Service: one annotation by default" {
@test "server/Service: no annotation by default" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-service.yaml \
. | tee /dev/stderr |
yq -r '.metadata.annotations | length' | tee /dev/stderr)
[ "${actual}" = "1" ]
[ "${actual}" = "0" ]
}

@test "server/Service: can set annotations" {
Expand Down