mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-06-10 10:36:16 +00:00
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:
@@ -54,6 +54,7 @@
|
||||
replicas: 0
|
||||
wait: yes
|
||||
register: scale_down
|
||||
diff: true
|
||||
|
||||
- name: Get pods in scale-deploy
|
||||
k8s_info:
|
||||
@@ -143,7 +144,7 @@
|
||||
that:
|
||||
- scale_up is changed
|
||||
- '"duration" in scale_up'
|
||||
- scale_up.diff
|
||||
- scale_up.diff is not defined
|
||||
- scale_up_further_deploy_pods.resources | length == 2
|
||||
|
||||
- name: Don't scale the deployment up
|
||||
@@ -170,7 +171,7 @@
|
||||
assert:
|
||||
that:
|
||||
- scale_up_noop is not changed
|
||||
- not scale_up_noop.diff
|
||||
- scale_up_noop.diff is not defined
|
||||
- scale_up_noop_pods.resources | length == 2
|
||||
- '"duration" in scale_up_noop'
|
||||
|
||||
@@ -183,6 +184,7 @@
|
||||
replicas: 1
|
||||
wait: no
|
||||
register: scale_down_no_wait
|
||||
diff: true
|
||||
|
||||
- name: Ensure that scale down succeeds
|
||||
k8s_info:
|
||||
|
||||
Reference in New Issue
Block a user