mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 13:32:37 +00:00
Ensure compatibility with Helm v4 for the collection (#1090)
SUMMARY Ensure compatibility with Helm v4 for modules helm_plugin and helm_plugin_info Partially addresses #1038 ISSUE TYPE Feature Pull Request COMPONENT NAME helm_plugin helm_plugin_info helm_info helm_pull helm_registry_auth helm helm_template Reviewed-by: Bianca Henderson <beeankha@gmail.com> Reviewed-by: Yuriy Novostavskiy <yuriy@novostavskiy.kyiv.ua> Reviewed-by: Alina Buzachis
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- 3.8.0
|
||||
- 3.1.0
|
||||
- 3.0.0
|
||||
- 2.3.0
|
||||
- 4.0.0
|
||||
|
||||
- block:
|
||||
- name: Create temp directory for helm tests
|
||||
@@ -20,37 +20,13 @@
|
||||
- set_fact:
|
||||
destination: "{{ temp_dir }}"
|
||||
|
||||
- name: Create Helm directories
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ temp_dir }}/{{ item }}"
|
||||
with_items: "{{ helm_versions }}"
|
||||
|
||||
- name: Unarchive Helm binary
|
||||
unarchive:
|
||||
src: "https://get.helm.sh/helm-v{{ item }}-linux-amd64.tar.gz"
|
||||
dest: "{{ temp_dir }}/{{ item }}"
|
||||
remote_src: yes
|
||||
with_items: "{{ helm_versions }}"
|
||||
|
||||
# Testing helm pull with helm version == 2.3.0
|
||||
- block:
|
||||
- name: Assert that helm pull failed with helm <= 3.0.0
|
||||
helm_pull:
|
||||
binary_path: "{{ helm_path }}"
|
||||
chart_ref: https://github.com/grafana/helm-charts/releases/download/grafana-5.6.0/grafana-5.6.0.tgz
|
||||
destination: "{{ destination }}"
|
||||
ignore_errors: true
|
||||
register: _result
|
||||
|
||||
- name: assert that module failed with proper message
|
||||
assert:
|
||||
that:
|
||||
- _result is failed
|
||||
- _result.msg == "Helm version must be >=3.0.0,<4.0.0, current version is 2.3.0"
|
||||
|
||||
- name: Install Helm versions
|
||||
ansible.builtin.include_role:
|
||||
name: install_helm
|
||||
loop: "{{ helm_versions }}"
|
||||
vars:
|
||||
helm_path: "{{ temp_dir }}/2.3.0/linux-amd64/helm"
|
||||
helm_version: "v{{ item }}"
|
||||
helm_install_path: "{{ temp_dir }}/{{ item }}"
|
||||
|
||||
# Testing helm pull with helm version == 3.0.0
|
||||
- block:
|
||||
@@ -103,7 +79,7 @@
|
||||
- _result.msg == "Parameter chart_ca_cert requires helm >= 3.1.0, current version is 3.0.0"
|
||||
|
||||
vars:
|
||||
helm_path: "{{ temp_dir }}/3.0.0/linux-amd64/helm"
|
||||
helm_path: "{{ temp_dir }}/3.0.0/helm"
|
||||
|
||||
# Testing helm pull with helm version == 3.1.0
|
||||
- block:
|
||||
@@ -143,7 +119,7 @@
|
||||
- _result.msg == "Parameter skip_tls_certs_check requires helm >= 3.3.0, current version is 3.1.0"
|
||||
|
||||
vars:
|
||||
helm_path: "{{ temp_dir }}/3.1.0/linux-amd64/helm"
|
||||
helm_path: "{{ temp_dir }}/3.1.0/helm"
|
||||
|
||||
# Testing helm pull with helm version == 3.8.0
|
||||
- block:
|
||||
@@ -317,7 +293,7 @@
|
||||
- _chart_after_force.stat.isdir
|
||||
|
||||
vars:
|
||||
helm_path: "{{ temp_dir }}/3.8.0/linux-amd64/helm"
|
||||
helm_path: "{{ temp_dir }}/3.8.0/helm"
|
||||
|
||||
|
||||
always:
|
||||
|
||||
Reference in New Issue
Block a user