From e49f58dc4fd0924f9bf031391ff9a6052e3aaaf2 Mon Sep 17 00:00:00 2001 From: Petr OspalĂ˝ Date: Thu, 23 May 2019 14:34:22 +0200 Subject: Add support for extra helm install arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie0b4e812acf6fba4e4b8f082533ab2f998456095 Issue-ID: OOM-1877 Signed-off-by: Petr OspalĂ˝ --- ansible/roles/application/defaults/main.yml | 2 ++ ansible/roles/application/molecule/default/tests/test_default.py | 3 ++- ansible/roles/application/tasks/install.yml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'ansible/roles/application') 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 -- cgit 1.2.3-korg