Changed vault service port and targetPort to values file (#43)
* Changed vault service port and targetPort to values file * Fixed typo in vaules, adding server-service changes and tests * Changed port and targetPort to server.service
This commit is contained in:
parent
2852fbba9b
commit
3f5b0b7b7e
3 changed files with 39 additions and 2 deletions
|
@ -24,8 +24,8 @@ spec:
|
|||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: http
|
||||
port: 8200
|
||||
targetPort: 8200
|
||||
port: {{ .Values.server.service.port }}
|
||||
targetPort: {{ .Values.server.service.targetPort }}
|
||||
- name: internal
|
||||
port: 8201
|
||||
targetPort: 8201
|
||||
|
|
|
@ -212,3 +212,35 @@ load _helpers
|
|||
yq -r '.spec.clusterIP' | tee /dev/stderr)
|
||||
[ "${actual}" = "None" ]
|
||||
}
|
||||
|
||||
@test "server/Service: port and targetPort will be 8200 by default" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/server-service.yaml \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.ports[0].port' | tee /dev/stderr)
|
||||
[ "${actual}" = "8200" ]
|
||||
|
||||
local actual=$(helm template \
|
||||
-x templates/server-service.yaml \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.ports[0].targetPort' | tee /dev/stderr)
|
||||
[ "${actual}" = "8200" ]
|
||||
}
|
||||
|
||||
@test "server/Service: port and targetPort can be set" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/server-service.yaml \
|
||||
--set 'server.service.port=8000' \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.ports[0].port' | tee /dev/stderr)
|
||||
[ "${actual}" = "8000" ]
|
||||
|
||||
local actual=$(helm template \
|
||||
-x templates/server-service.yaml \
|
||||
--set 'server.service.targetPort=80' \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.ports[0].targetPort' | tee /dev/stderr)
|
||||
[ "${actual}" = "80" ]
|
||||
}
|
|
@ -93,6 +93,11 @@ server:
|
|||
# load balancer.
|
||||
# clusterIP: None
|
||||
|
||||
# Port on which Vault server is listening
|
||||
port: 8200
|
||||
# Target port to which the service should be mapped to
|
||||
targetPort: 8200
|
||||
|
||||
# This configures the Vault Statefulset to create a PVC for data
|
||||
# storage when using the file backend.
|
||||
# See https://www.vaultproject.io/docs/audit/index.html to know more
|
||||
|
|
Loading…
Reference in a new issue