Skip to content

Commit 018ebf6

Browse files
committedOct 21, 2021
review feedback
ingressClassName default to "", and test when ingressClassName is not set.
1 parent 32d0ba7 commit 018ebf6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎test/unit/server-ingress.bats

+11
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ load _helpers
143143
[ "${actual}" = "nginx" ]
144144
}
145145

146+
@test "server/ingress: ingressClassName is not added by default" {
147+
cd `chart_dir`
148+
149+
local actual=$(helm template \
150+
--show-only templates/server-ingress.yaml \
151+
--set 'server.ingress.enabled=true' \
152+
. | tee /dev/stderr |
153+
yq -r '.spec.ingressClassName' | tee /dev/stderr)
154+
[ "${actual}" = "null" ]
155+
}
156+
146157
@test "server/ingress: uses active service when ha by default - yaml" {
147158
cd `chart_dir`
148159

‎values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ server:
263263

264264
# Optionally use ingressClassName instead of deprecated annotation.
265265
# See: https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation
266-
ingressClassName: ~
266+
ingressClassName: ""
267267

268268
# When HA mode is enabled and K8s service registration is being used,
269269
# configure the ingress to point to the Vault active service.

0 commit comments

Comments
 (0)