From: Petr OspalĂ˝ Date: Thu, 23 May 2019 12:34:22 +0000 (+0200) Subject: Add support for extra helm install arguments X-Git-Tag: 6.0.0-ONAP~184^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e49f58dc4fd0924f9bf031391ff9a6052e3aaaf2;p=oom%2Foffline-installer.git Add support for extra helm install arguments Change-Id: Ie0b4e812acf6fba4e4b8f082533ab2f998456095 Issue-ID: OOM-1877 Signed-off-by: Petr OspalĂ˝ --- 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