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:
Gonéri Le Bouder
2021-01-05 14:53:20 -05:00
committed by GitHub
parent 221631c06a
commit 01ee3e603c
3 changed files with 37 additions and 1 deletions

View File

@@ -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