summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorPetr OspalĂ˝ <p.ospaly@partner.samsung.com>2019-05-23 14:34:22 +0200
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 10:35:12 +0000
commite49f58dc4fd0924f9bf031391ff9a6052e3aaaf2 (patch)
tree28e34fbfe595df54494c9cedd090ae87fe507cc2 /ansible
parentb1fe78553ea7d1caf90c1d52e195cd8f2a082008 (diff)
Add support for extra helm install arguments
Change-Id: Ie0b4e812acf6fba4e4b8f082533ab2f998456095 Issue-ID: OOM-1877 Signed-off-by: Petr OspalĂ˝ <p.ospaly@partner.samsung.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/application/defaults/main.yml2
-rw-r--r--ansible/roles/application/molecule/default/tests/test_default.py3
-rw-r--r--ansible/roles/application/tasks/install.yml1
3 files changed, 5 insertions, 1 deletions
diff --git a/ansible/roles/application/defaults/main.yml b/ansible/roles/application/defaults/main.yml
index dec17601..84fffeca 100644
--- a/ansible/roles/application/defaults/main.yml
+++ b/ansible/roles/application/defaults/main.yml
@@ -1,6 +1,8 @@
---
helm_repository_name: local
helm_repository_url: http://127.0.0.1:8879
+helm_extra_install_options:
+ - { opt: '--timeout 1800'}
# Override file generation for Helm application can be customized by any role
# given by user and found by ansible from roles_path.
# By default override file is generated by 'application-override' role that is
diff --git a/ansible/roles/application/molecule/default/tests/test_default.py b/ansible/roles/application/molecule/default/tests/test_default.py
index 3e0cbb42..5edceff3 100644
--- a/ansible/roles/application/molecule/default/tests/test_default.py
+++ b/ansible/roles/application/molecule/default/tests/test_default.py
@@ -16,7 +16,8 @@ serve
repo list
repo add local http://127.0.0.1:8879
install --name moleculetestapp local/moleculetestapp --namespace \
-moleculetestapp -f /opt/moleculetestapp/override.yaml"""
+moleculetestapp -f /opt/moleculetestapp/override.yaml \
+--timeout 1800"""
assert fc == expected_content
diff --git a/ansible/roles/application/tasks/install.yml b/ansible/roles/application/tasks/install.yml
index cdc7ced0..bdf6e511 100644
--- a/ansible/roles/application/tasks/install.yml
+++ b/ansible/roles/application/tasks/install.yml
@@ -72,6 +72,7 @@
{{ helm_repository_name }}/{{ app_helm_chart_name }}
--namespace {{ app_kubernetes_namespace }}
{{ '' if app_skip_helm_override else '-f ' + app_helm_override_file }}
+ {% for arg in helm_extra_install_options %} {{ arg.opt }} {% endfor %}
changed_when: true # when executed its a changed type of action
register: helm_install
failed_when: helm_install.stderr