k8s support diff mode (#146)

* support diff mode for k8s module

* Update and rename 145-k8s-add-support-diff-mode.yml to 146-k8s-add-support-diff-mode.yml

* Update 146-k8s-add-support-diff-mode.yml

* Update changelogs/fragments/146-k8s-add-support-diff-mode.yml

Co-authored-by: Mike Graves <mgraves@redhat.com>

* update k8s_scale and k8s_json_patch

* diff for k8s_scale  and k8s_json_patch

Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
abikouo
2021-07-21 14:29:28 +02:00
committed by GitHub
parent e9be88f212
commit 3c36b6fa0f
9 changed files with 200 additions and 9 deletions

View File

@@ -43,6 +43,7 @@
value: busybox:glibc
check_mode: yes
register: result
diff: yes
- name: Assert patch was made
assert:
@@ -50,6 +51,7 @@
- result.changed
- result.result.metadata.labels.label2 == "bar"
- result.result.spec.containers[0].image == "busybox:glibc"
- result.diff
- name: Describe pod
kubernetes.core.k8s_info:
@@ -82,6 +84,7 @@
assert:
that:
- result.changed
- result.diff is not defined
- name: Describe pod
kubernetes.core.k8s_info: