mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 05:22:39 +00:00
helm: 'changed' flag takes 'values' in consideration (#332)
Return `changed` `False` is the `values_files` match the `values` of the existing deployment. Closes: #274
This commit is contained in:
@@ -295,6 +295,22 @@
|
||||
- install.status.chart == "{{ chart_test }}-{{ chart_test_version }}"
|
||||
- "install.status['values'].revisionHistoryLimit == 0"
|
||||
|
||||
- name: "Install {{ chart_test }} from {{ source }} with values_files (again)"
|
||||
helm:
|
||||
binary_path: "{{ helm_binary }}"
|
||||
name: test
|
||||
chart_ref: "{{ chart_source }}"
|
||||
chart_version: "{{ chart_source_version | default(omit) }}"
|
||||
namespace: "{{ helm_namespace }}"
|
||||
values_files:
|
||||
- "{{ role_path }}/files/values.yaml"
|
||||
register: install
|
||||
|
||||
- name: "Assert the result is consistent"
|
||||
assert:
|
||||
that:
|
||||
- not (install is changed)
|
||||
|
||||
- name: Remove helm namespace
|
||||
k8s:
|
||||
api_version: v1
|
||||
|
||||
Reference in New Issue
Block a user