Allow overridable inject image, test images
This commit is contained in:
parent
dc362ea4e4
commit
3a55af62fe
3 changed files with 15 additions and 3 deletions
|
@ -27,7 +27,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: sidecar-injector
|
||||
image: us.gcr.io/mitchellh-k8s/consul-k8s:latest
|
||||
image: "{{ .Values.connectInject.image }}"
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
|
|
|
@ -3,9 +3,20 @@ name_prefix() {
|
|||
printf "consul"
|
||||
}
|
||||
|
||||
# helm_install installs the Consul chart.
|
||||
# helm_install installs the Consul chart. This will source overridable
|
||||
# values from the "values.yaml" file in this directory. This can be set
|
||||
# by CI or other environments to do test-specific overrides. Note that its
|
||||
# easily possible to break tests this way so be careful.
|
||||
helm_install() {
|
||||
helm install --name consul --wait ${BATS_TEST_DIRNAME}/..
|
||||
local values="${BATS_TEST_DIRNAME}/values.yaml"
|
||||
if [ ! -f "${values}" ]; then
|
||||
touch $values
|
||||
fi
|
||||
|
||||
helm install -f ${values} \
|
||||
--name consul \
|
||||
--wait \
|
||||
${BATS_TEST_DIRNAME}/..
|
||||
}
|
||||
|
||||
# helm_delete deletes the Consul chart and all resources.
|
||||
|
|
|
@ -61,6 +61,7 @@ client:
|
|||
# ConnectInject will enable the automatic Connect sidecar injector.
|
||||
connectInject:
|
||||
enabled: true
|
||||
image: "us.gcr.io/mitchellh-k8s/consul-k8s:latest"
|
||||
default: false # true will inject by default, otherwise requires annotation
|
||||
caBundle: "" # empty will auto generate the bundle
|
||||
|
||||
|
|
Loading…
Reference in a new issue