[helm] Add the force_update arg (#509)

[helm] Add the force_update arg

Depends-On: ansible/ansible-zuul-jobs#1648
Depends-On: #522
SUMMARY
Sometimes a Helm repo needs to be updated with a new URL. The helm repo add command allows for this with the --force-update flag:
      --force-update               replace (overwrite) the repo if it already exists


ISSUE TYPE

Feature Pull Request - Closes #491

COMPONENT NAME
kubernetes.core.helm_repository
ADDITIONAL INFORMATION

Reviewed-by: Mor Cohen <morcohen1201@gmail.com>
Reviewed-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
Mor Cohen
2022-10-03 18:00:44 +03:00
committed by GitHub
parent 43ad31d936
commit 0e86fe0b7b
3 changed files with 31 additions and 1 deletions

View File

@@ -42,6 +42,19 @@
that:
- repository_errors is failed
- name: Succesfully add repository with the same name when forcing
helm_repository:
binary_path: "{{ helm_binary }}"
name: test_helm_repo
repo_url: "{{ chart_test_repo }}"
force: true
register: repository
- name: Assert that test_helm_repo repository is changed
assert:
that:
- repository is changed
- name: Remove test_helm_repo chart repository
helm_repository:
binary_path: "{{ helm_binary }}"