publishNotReadyAddresses for headless service always true (#902)

This commit is contained in:
Tom Proctor 2023-05-30 15:54:00 +01:00 committed by GitHub
parent 3640daaf65
commit da34c6c986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,7 @@
Changes: Changes:
* Latest Kubernetes version tested is now 1.27 * Latest Kubernetes version tested is now 1.27
* server: Headless service ignores `server.service.publishNotReadyAddresses` setting and always sets it as `true` [GH-902](https://github.com/hashicorp/vault-helm/pull/902)
Bugs: Bugs:
* server: Set the default for `prometheusRules.rules` to an empty list [GH-886](https://github.com/hashicorp/vault-helm/pull/886) * server: Set the default for `prometheusRules.rules` to an empty list [GH-886](https://github.com/hashicorp/vault-helm/pull/886)

View file

@ -23,7 +23,7 @@ metadata:
{{ template "vault.service.annotations" .}} {{ template "vault.service.annotations" .}}
spec: spec:
clusterIP: None clusterIP: None
publishNotReadyAddresses: {{ .Values.server.service.publishNotReadyAddresses }} publishNotReadyAddresses: true
ports: ports:
- name: "{{ include "vault.scheme" . }}" - name: "{{ include "vault.scheme" . }}"
port: {{ .Values.server.service.port }} port: {{ .Values.server.service.port }}

View file

@ -2,7 +2,7 @@
load _helpers load _helpers
@test "server/headless-Service: publishNotReadyAddresses can be changed" { @test "server/headless-Service: publishNotReadyAddresses cannot be changed" {
cd `chart_dir` cd `chart_dir`
local actual=$(helm template \ local actual=$(helm template \
--show-only templates/server-headless-service.yaml \ --show-only templates/server-headless-service.yaml \
@ -15,7 +15,7 @@ load _helpers
--set 'server.service.publishNotReadyAddresses=false' \ --set 'server.service.publishNotReadyAddresses=false' \
. | tee /dev/stderr | . | tee /dev/stderr |
yq -r '.spec.publishNotReadyAddresses' | tee /dev/stderr) yq -r '.spec.publishNotReadyAddresses' | tee /dev/stderr)
[ "${actual}" = "false" ] [ "${actual}" = "true" ]
} }
@test "server/headless-Service: instance selector cannot be disabled" { @test "server/headless-Service: instance selector cannot be disabled" {

View file

@ -673,7 +673,9 @@ server:
# or NodePort. # or NodePort.
#type: ClusterIP #type: ClusterIP
# Do not wait for pods to be ready # Do not wait for pods to be ready before including them in the services'
# targets. Does not apply to the headless service, which is used for
# cluster-internal communication.
publishNotReadyAddresses: true publishNotReadyAddresses: true
# The externalTrafficPolicy can be set to either Cluster or Local # The externalTrafficPolicy can be set to either Cluster or Local