Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #204 from elastic/always_always
Browse files Browse the repository at this point in the history
[kibana] Make imagePullPolicy actually do something
  • Loading branch information
Crazybus committed Jul 8, 2019
2 parents 1b35413 + 7d82075 commit 5acb1b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions kibana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
securityContext:
{{ toYaml .Values.securityContext | indent 10 }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
env:
{{- if .Values.elasticsearchURL }}
- name: ELASTICSEARCH_URL
Expand Down
15 changes: 15 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,18 @@ def test_override_the_serverHost():
c = r['deployment'][name]['spec']['template']['spec']['containers'][0]
assert c['env'][1]['name'] == 'SERVER_HOST'
assert c['env'][1]['value'] == 'localhost'

def test_override_imagePullPolicy():
config = ''

r = helm_template(config)
c = r['deployment'][name]['spec']['template']['spec']['containers'][0]
assert c['imagePullPolicy'] == 'IfNotPresent'

config = '''
imagePullPolicy: Always
'''

r = helm_template(config)
c = r['deployment'][name]['spec']['template']['spec']['containers'][0]
assert c['imagePullPolicy'] == 'Always'

0 comments on commit 5acb1b0

Please sign in to comment.