Skip to content

Commit

Permalink
Add extraArgs configurable (hashicorp#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonodonnell authored Jan 14, 2020
1 parent 4ee82fd commit ac2925d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ for users looking to use this chart with Consul Helm.
- |
sed -E "s/HOST_IP/${HOST_IP?}/g" /vault/config/extraconfig-from-values.hcl > /tmp/storageconfig.hcl;
sed -Ei "s/POD_IP/${POD_IP?}/g" /tmp/storageconfig.hcl;
/usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl
/usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl {{ .Values.server.extraArgs }}
{{ end }}
{{- end -}}
Expand Down
Empty file modified test/unit/server-ingress.bats
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions test/unit/server-statefulset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -804,3 +804,13 @@ load _helpers
yq -r '.spec.template.spec.containers[0].livenessProbe.initialDelaySeconds' | tee /dev/stderr)
[ "${actual}" = "30" ]
}

@test "server/standalone-StatefulSet: add extraArgs" {
cd `chart_dir`
local actual=$(helm template \
-x templates/server-statefulset.yaml \
--set 'server.extraArgs=foobar' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].args[0]' | tee /dev/stderr)
[[ "${actual}" = *"foobar"* ]]
}
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ server:
# extraContainers is a list of sidecar containers. Specified as a raw YAML string.
extraContainers: null

# extraArgs is a string containing additional Vault server arguments.
extraArgs: ""

# Used to define custom readinessProbe settings
readinessProbe:
Expand Down

0 comments on commit ac2925d

Please sign in to comment.