Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s_scale doesn't honor wait_timeout #203

Closed
haroonb opened this issue Aug 16, 2021 · 3 comments · Fixed by #391
Closed

k8s_scale doesn't honor wait_timeout #203

haroonb opened this issue Aug 16, 2021 · 3 comments · Fixed by #391
Labels
type/bug Something isn't working

Comments

@haroonb
Copy link

haroonb commented Aug 16, 2021

SUMMARY

k8s_scale module doesn't wait for Deployment to reach desired state.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.kubernetes.k8s_scale:

ANSIBLE VERSION
ansible 2.9.18
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/haroon/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]

COLLECTION VERSION
cant list collections

CONFIGURATION
DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = [u'profile_tasks']
DEFAULT_JINJA2_NATIVE(/etc/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log

OS / ENVIRONMENT
STEPS TO REPRODUCE
 21     - name: Scale down
 22       community.kubernetes.k8s_scale:
 23         api_version: v1
 24         kind: "{{ item.0 }}"
 25         name: "{{ item.1 }}"
 26         namespace: "{{ item.2 }}"
 27         replicas: "{{ item.3 }}"
 28         wait: yes
 29         wait_timeout: 600
 30       loop: "{{ data[0:]|list }}"
 31       vars:
 32         data:
 33           - ['Deployment', 'postgres-operator', "{{ namespace }}", '0']
 34           - ['StatefulSet', 'acid-postgres-cluster', "{{ namespace }}", '0']

EXPECTED RESULTS

wait for the deployment and statefulset to reach desired state within the wait_timeout.

ACTUAL RESULTS

The play just continues without waiting for deployment to reach desired state. It just scales the deployment and statefulset down and continues.


TASK [Scale down] **************************************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /home/haroon/00xSuite/ansible_playbooks/restore/postgres_restore.yaml:22
Monday 16 August 2021  08:57:01 +0000 (0:00:03.052)       0:00:03.171 *********
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'echo ~wmd && sleep
 0'"'"''
<10.83.19.20> (0, '/home/wmd\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK
\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client
_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'( umask 77 && mkdi
r -p "` echo /home/wmd/.ansible/tmp `"&& mkdir "` echo /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281 `" && echo ansible-tmp-1629104221.54-19303-136417589226281="` echo /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281 `" ) && sleep 0'"'"''
<10.83.19.20> (0, 'ansible-tmp-1629104221.54-19303-136417589226281=/home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config l
ine 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_requ
est_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
Using module file /usr/share/ansible/collections/ansible_collections/community/kubernetes/plugins/modules/k8s_scale.py
<10.83.19.20> PUT /home/haroon/.ansible/tmp/ansible-local-19284mX_Wl5/tmpN1csDb TO /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/AnsiballZ_k8s_scale.py
<10.83.19.20> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 '[10.83.19.20]'
<10.83.19.20> (0, 'sftp> put /home/haroon/.ansible/tmp/ansible-local-19284mX_Wl5/tmpN1csDb /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/AnsiballZ_k8s_scale.py\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/
ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_req
uest_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com
" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 6 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/wmd size 0\r\ndebug3: Looking up /home/haroon/.ansible/t
mp/ansible-local-19284mX_Wl5/tmpN1csDb\r\ndebug3: Sent message fd 6 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/AnsiballZ_k8s_scale.py\r\ndebug3: Sent message SSH2_FXP_WR
ITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:1723\r\ndebug3: SSH2_FX
P_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 1723 bytes at 131072\r\ndebug3: Sent message SSH2_F
XP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'chmod u+x /home/wm
d/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/ /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/AnsiballZ_k8s_scale.py && sleep 0'"'"''
<10.83.19.20> (0, '', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2:
 mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_se
ssion: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 -tt 10.83.19.20 '/bin/sh -c '"'"'/usr/bin/pytho
n3.6 /home/wmd/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/AnsiballZ_k8s_scale.py && sleep 0'"'"''
<10.83.19.20> (0, '/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.25.10) or chardet (3.0.4) doesn\'t match a supported version!\r\n  RequestsDependencyWarning)\r\n\r\n{"changed": false, "result": {"kind": "Deployment", "apiVersion": "apps/v1", "metadata": {"name": "postgres-operator", "namespace": "default",
 "uid": "4006e60c-43e8-4168-9658-6a6bccb66b2a", "resourceVersion": "284312661", "generation": 94, "creationTimestamp": "2020-09-28T07:04:38Z", "labels": {"application": "postgres-operator", "velero.io/backup-name": "fs-initial-3", "velero.io/restore-name": "fs-initial-3-20200928055323"}, "annotations": {"deployment.kubernetes.io/revision": "2"}, "managed
Fields": [{"manager": "velero-server", "operation": "Update", "apiVersion": "apps/v1", "time": "2020-09-28T07:04:38Z", "fieldsType": "FieldsV1", "fieldsV1": {"f:metadata": {"f:annotations": {".": {}, "f:deployment.kubernetes.io/revision": {}}, "f:labels": {".": {}, "f:velero.io/backup-name": {}, "f:velero.io/restore-name": {}}}, "f:spec": {"f:progressDea
dlineSeconds": {}, "f:revisionHistoryLimit": {}, "f:selector": {}, "f:strategy": {"f:rollingUpdate": {".": {}, "f:maxSurge": {}, "f:maxUnavailable": {}}, "f:type": {}}, "f:template": {"f:metadata": {"f:labels": {".": {}, "f:name": {}}}, "f:spec": {"f:containers": {"k:{\\"name\\":\\"postgres-operator\\"}": {".": {}, "f:env": {".": {}, "k:{\\"name\\":\\"CO
NFIG_MAP_NAME\\"}": {".": {}, "f:name": {}, "f:value": {}}}, "f:imagePullPolicy": {}, "f:name": {}, "f:resources": {".": {}, "f:limits": {".": {}, "f:cpu": {}, "f:memory": {}}, "f:requests": {".": {}, "f:cpu": {}, "f:memory": {}}}, "f:securityContext": {".": {}, "f:readOnlyRootFilesystem": {}, "f:runAsNonRoot": {}, "f:runAsUser": {}}, "f:terminationMessa
gePath": {}, "f:terminationMessagePolicy": {}}}, "f:dnsPolicy": {}, "f:restartPolicy": {}, "f:schedulerName": {}, "f:securityContext": {}, "f:serviceAccount": {}, "f:serviceAccountName": {}, "f:terminationGracePeriodSeconds": {}}}}}}, {"manager": "OpenAPI-Generator", "operation": "Update", "apiVersion": "apps/v1", "time": "2021-04-09T11:37:06Z", "fieldsT
ype": "FieldsV1", "fieldsV1": {"f:metadata": {"f:labels": {"f:application": {}}}, "f:spec": {"f:replicas": {}, "f:template": {"f:spec": {"f:containers": {"k:{\\"name\\":\\"postgres-operator\\"}": {"f:image": {}}}}}}}}, {"manager": "kube-controller-manager", "operation": "Update", "apiVersion": "apps/v1", "time": "2021-08-16T08:11:08Z", "fieldsType": "Fie
ldsV1", "fieldsV1": {"f:metadata": {"f:annotations": {"f:deployment.kubernetes.io/revision": {}}}, "f:status": {"f:conditions": {".": {}, "k:{\\"type\\":\\"Available\\"}": {".": {}, "f:lastTransitionTime": {}, "f:lastUpdateTime": {}, "f:message": {}, "f:reason": {}, "f:status": {}, "f:type": {}}, "k:{\\"type\\":\\"Progressing\\"}": {".": {}, "f:lastTrans
itionTime": {}, "f:lastUpdateTime": {}, "f:message": {}, "f:reason": {}, "f:status": {}, "f:type": {}}}, "f:observedGeneration": {}}}}]}, "spec": {"replicas": 0, "selector": {"matchLabels": {"name": "postgres-operator"}}, "template": {"metadata": {"creationTimestamp": null, "labels": {"name": "postgres-operator"}}, "spec": {"containers": [{"name": "postg
res-operator", "image": "registry.opensource.zalan.do/acid/postgres-operator:v1.6.0", "env": [{"name": "CONFIG_MAP_NAME", "value": "postgres-operator"}], "resources": {"limits": {"cpu": "500m", "memory": "500Mi"}, "requests": {"cpu": "100m", "memory": "250Mi"}}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "imageP
ullPolicy": "IfNotPresent", "securityContext": {"runAsUser": 1000, "runAsNonRoot": true, "readOnlyRootFilesystem": true}}], "restartPolicy": "Always", "terminationGracePeriodSeconds": 30, "dnsPolicy": "ClusterFirst", "serviceAccountName": "postgres-operator", "serviceAccount": "postgres-operator", "securityContext": {}, "schedulerName": "default-schedule
r"}}, "strategy": {"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "25%", "maxSurge": "25%"}}, "revisionHistoryLimit": 10, "progressDeadlineSeconds": 600}, "status": {"observedGeneration": 94, "conditions": [{"type": "Progressing", "status": "True", "lastUpdateTime": "2021-04-09T11:37:13Z", "lastTransitionTime": "2020-09-28T07:04:43Z", "reas
on": "NewReplicaSetAvailable", "message": "ReplicaSet \\"postgres-operator-65dcbf585b\\" has successfully progressed."}, {"type": "Available", "status": "True", "lastUpdateTime": "2021-08-16T08:11:08Z", "lastTransitionTime": "2021-08-16T08:11:08Z", "reason": "MinimumReplicasAvailable", "message": "Deployment has minimum availability."}]}}, "diff": {}, "d
uration": 0, "invocation": {"module_args": {"namespace": "default", "wait": true, "api_version": "v1", "replicas": 0, "wait_timeout": 600, "kind": "Deployment", "name": "postgres-operator", "current_replicas": null, "resource_version": null, "resource_definition": null, "src": null, "kubeconfig": null, "context": null, "host": null, "api_key": null, "use
rname": null, "password": null, "validate_certs": null, "ca_cert": null, "client_cert": null, "client_key": null, "proxy": null, "persist_config": null}}}\r\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /e
tc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebu
g3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.83.19.20 closed.\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'rm -f -r /home/wmd
/.ansible/tmp/ansible-tmp-1629104221.54-19303-136417589226281/ > /dev/null 2>&1 && sleep 0'"'"''
<10.83.19.20> (0, '', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2:
 mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_se
ssion: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
ok: [fs-m1] => (item=[u'Deployment', u'postgres-operator', u'default', u'0']) => {
    "ansible_loop_var": "item",
    "changed": false,
    "diff": {},
    "duration": 0,
    "invocation": {
        "module_args": {
            "api_key": null,
            "api_version": "v1",
            "ca_cert": null,
            "client_cert": null,
            "client_key": null,
            "context": null,
            "current_replicas": null,
            "host": null,
            "kind": "Deployment",
            "kubeconfig": null,
            "name": "postgres-operator",
            "namespace": "default",
            "password": null,
            "persist_config": null,
            "proxy": null,
            "replicas": 0,
            "resource_definition": null,
            "resource_version": null,
            "src": null,
            "username": null,
            "validate_certs": null,
            "wait": true,
            "wait_timeout": 600
        }
    },
    "item": [
        "Deployment",
        "postgres-operator",
        "default",
        "0"
    ],
    "result": {
        "apiVersion": "apps/v1",
        "kind": "Deployment",
        "metadata": {
            "annotations": {
                "deployment.kubernetes.io/revision": "2"
            },
            "creationTimestamp": "2020-09-28T07:04:38Z",
            "generation": 94,
            "labels": {
                "application": "postgres-operator",
                "velero.io/backup-name": "fs-initial-3",
                "velero.io/restore-name": "fs-initial-3-20200928055323"
            },
            "managedFields": [
                {
                    "apiVersion": "apps/v1",
                    "fieldsType": "FieldsV1",
                    "fieldsV1": {
                        "f:metadata": {
                            "f:annotations": {
                                ".": {},
                                "f:deployment.kubernetes.io/revision": {}
                            },
                            "f:labels": {
                                ".": {},
                                "f:velero.io/backup-name": {},
                                "f:velero.io/restore-name": {}
                            }
                        },
                        "f:spec": {
                            "f:progressDeadlineSeconds": {},
                            "f:revisionHistoryLimit": {},
                            "f:selector": {},
                            "f:strategy": {
                                "f:rollingUpdate": {
                                    ".": {},
                                    "f:maxSurge": {},
                                    "f:maxUnavailable": {}
                                },
                                "f:type": {}
                            },
                            "f:template": {
                                "f:metadata": {
                                    "f:labels": {
                                        ".": {},
                                        "f:name": {}
                                    }
                                },
                                "f:spec": {
                                    "f:containers": {
                                        "k:{\"name\":\"postgres-operator\"}": {
                                            ".": {},
                                            "f:env": {
                                                ".": {},
                                                "k:{\"name\":\"CONFIG_MAP_NAME\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                }
                                            },
                                            "f:imagePullPolicy": {},
                                            "f:name": {},
                                            "f:resources": {
                                                ".": {},
                                                "f:limits": {
                                                    ".": {},
                                                    "f:cpu": {},
                                                    "f:memory": {}
                                                },
                                                "f:requests": {
                                                    ".": {},
                                                    "f:cpu": {},
                                                    "f:memory": {}
                                                }
                                            },
                                            "f:securityContext": {
                                                ".": {},
                                                "f:readOnlyRootFilesystem": {},
                                                "f:runAsNonRoot": {},
                                                "f:runAsUser": {}
                                            },
                                            "f:terminationMessagePath": {},
                                            "f:terminationMessagePolicy": {}
                                        }
                                    },
                                    "f:dnsPolicy": {},
                                    "f:restartPolicy": {},
                                    "f:schedulerName": {},
                                    "f:securityContext": {},
                                    "f:serviceAccount": {},
                                    "f:serviceAccountName": {},
                                    "f:terminationGracePeriodSeconds": {}
                                }
                            }
                        }
                    },
                    "manager": "velero-server",
                    "operation": "Update",
                    "time": "2020-09-28T07:04:38Z"
                },
                {
                    "apiVersion": "apps/v1",
                    "fieldsType": "FieldsV1",
                    "fieldsV1": {
                        "f:metadata": {
                            "f:labels": {
                                "f:application": {}
                            }
                        },
                        "f:spec": {
                            "f:replicas": {},
                            "f:template": {
                                "f:spec": {
                                    "f:containers": {
                                        "k:{\"name\":\"postgres-operator\"}": {
                                            "f:image": {}
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "manager": "OpenAPI-Generator",
                    "operation": "Update",
                    "time": "2021-04-09T11:37:06Z"
                },
                {
                    "apiVersion": "apps/v1",
                    "fieldsType": "FieldsV1",
                    "fieldsV1": {
                        "f:metadata": {
                            "f:annotations": {
                                "f:deployment.kubernetes.io/revision": {}
                            }
                        },
                        "f:status": {
                            "f:conditions": {
                                ".": {},
                                "k:{\"type\":\"Available\"}": {
                                    ".": {},
                                    "f:lastTransitionTime": {},
                                    "f:lastUpdateTime": {},
                                    "f:message": {},
                                    "f:reason": {},
                                    "f:status": {},
                                    "f:type": {}
                                },
                                "k:{\"type\":\"Progressing\"}": {
                                    ".": {},
                                    "f:lastTransitionTime": {},
                                    "f:lastUpdateTime": {},
                                    "f:message": {},
                                    "f:reason": {},
                                    "f:status": {},
                                    "f:type": {}
                                }
                            },
                            "f:observedGeneration": {}
                        }
                    },
                    "manager": "kube-controller-manager",
                    "operation": "Update",
                    "time": "2021-08-16T08:11:08Z"
                }
            ],
            "name": "postgres-operator",
            "namespace": "default",
            "resourceVersion": "284312661",
            "uid": "4006e60c-43e8-4168-9658-6a6bccb66b2a"
        },
        "spec": {
            "progressDeadlineSeconds": 600,
            "replicas": 0,
            "revisionHistoryLimit": 10,
            "selector": {
                "matchLabels": {
                    "name": "postgres-operator"
                }
            },
            "strategy": {
                "rollingUpdate": {
                    "maxSurge": "25%",
                    "maxUnavailable": "25%"
                },
                "type": "RollingUpdate"
            },
            "template": {
                "metadata": {
                    "creationTimestamp": null,
                    "labels": {
                        "name": "postgres-operator"
                    }
                },
                "spec": {
                    "containers": [
                        {
                            "env": [
                                {
                                    "name": "CONFIG_MAP_NAME",
                                    "value": "postgres-operator"
                                }
                            ],
                            "image": "registry.opensource.zalan.do/acid/postgres-operator:v1.6.0",
                            "imagePullPolicy": "IfNotPresent",
                            "name": "postgres-operator",
                            "resources": {
                                "limits": {
                                    "cpu": "500m",
                                    "memory": "500Mi"
                                },
                                "requests": {
                                    "cpu": "100m",
                                    "memory": "250Mi"
                                }
                            },
                            "securityContext": {
                                "readOnlyRootFilesystem": true,
                                "runAsNonRoot": true,
                                "runAsUser": 1000
                            },
                            "terminationMessagePath": "/dev/termination-log",
                            "terminationMessagePolicy": "File"
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "restartPolicy": "Always",
                    "schedulerName": "default-scheduler",
                    "securityContext": {},
                    "serviceAccount": "postgres-operator",
                    "serviceAccountName": "postgres-operator",
                    "terminationGracePeriodSeconds": 30
                }
            }
        },
        "status": {
            "conditions": [
                {
                    "lastTransitionTime": "2020-09-28T07:04:43Z",
                    "lastUpdateTime": "2021-04-09T11:37:13Z",
                    "message": "ReplicaSet \"postgres-operator-65dcbf585b\" has successfully progressed.",
                    "reason": "NewReplicaSetAvailable",
                    "status": "True",
                    "type": "Progre<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'echo ~wmd && sleep
 0'"'"''
ssing"
                },
                {
                    "lastTransitionTime": "2021-08-16T08:11:08Z",
                    "lastUpdateTime": "2021-08-16T08:11:08Z",
                    "message": "Deployment has minimum availability.",
                    "reason": "MinimumReplicasAvailable",
                    "status": "True",
                    "type": "Available"
                }
            ],
            "observedGeneration": 94
        }
    }
}
<10.83.19.20> (0, '/home/wmd\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK
\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client
_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'( umask 77 && mkdi
r -p "` echo /home/wmd/.ansible/tmp `"&& mkdir "` echo /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507 `" && echo ansible-tmp-1629104222.84-19303-102935503308507="` echo /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507 `" ) && sleep 0'"'"''
<10.83.19.20> (0, 'ansible-tmp-1629104222.84-19303-102935503308507=/home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config l
ine 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_requ
est_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
Using module file /usr/share/ansible/collections/ansible_collections/community/kubernetes/plugins/modules/k8s_scale.py
<10.83.19.20> PUT /home/haroon/.ansible/tmp/ansible-local-19284mX_Wl5/tmpB6rTvU TO /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/AnsiballZ_k8s_scale.py
<10.83.19.20> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 '[10.83.19.20]'
<10.83.19.20> (0, 'sftp> put /home/haroon/.ansible/tmp/ansible-local-19284mX_Wl5/tmpB6rTvU /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/AnsiballZ_k8s_scale.py\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/
ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_req
uest_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com
" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 6 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/wmd size 0\r\ndebug3: Looking up /home/haroon/.ansible/t
mp/ansible-local-19284mX_Wl5/tmpB6rTvU\r\ndebug3: Sent message fd 6 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/AnsiballZ_k8s_scale.py\r\ndebug3: Sent message SSH2_FXP_WR
ITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:1728\r\ndebug3: SSH2_FX
P_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 1728 bytes at 131072\r\ndebug3: Sent message SSH2_F
XP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'chmod u+x /home/wm
d/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/ /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/AnsiballZ_k8s_scale.py && sleep 0'"'"''
<10.83.19.20> (0, '', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2:
 mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_se
ssion: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 -tt 10.83.19.20 '/bin/sh -c '"'"'/usr/bin/pytho
n3.6 /home/wmd/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/AnsiballZ_k8s_scale.py && sleep 0'"'"''
<10.83.19.20> (0, '/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.25.10) or chardet (3.0.4) doesn\'t match a supported version!\r\n  RequestsDependencyWarning)\r\n\r\n{"result": {"kind": "StatefulSet", "apiVersion": "apps/v1", "metadata": {"name": "acid-postgres-cluster", "namespace": "default", "uid": "0d1b
56a2-42c1-4a4c-a824-44523c4c4a56", "resourceVersion": "284323732", "generation": 42, "creationTimestamp": "2021-07-27T11:25:58Z", "labels": {"application": "spilo", "cluster-name": "acid-postgres-cluster", "team": "acid"}, "annotations": {"zalando-postgres-operator-rolling-update-required": "false"}, "managedFields": [{"manager": "postgres-operator", "op
eration": "Update", "apiVersion": "apps/v1", "time": "2021-07-27T12:28:03Z", "fieldsType": "FieldsV1", "fieldsV1": {"f:metadata": {"f:annotations": {".": {}, "f:zalando-postgres-operator-rolling-update-required": {}}, "f:labels": {".": {}, "f:application": {}, "f:cluster-name": {}, "f:team": {}}}, "f:spec": {"f:podManagementPolicy": {}, "f:replicas": {},
 "f:revisionHistoryLimit": {}, "f:selector": {}, "f:serviceName": {}, "f:template": {"f:metadata": {"f:annotations": {".": {}, "f:backup.velero.io/backup-volumes": {}}, "f:labels": {".": {}, "f:application": {}, "f:cluster-name": {}, "f:team": {}}, "f:namespace": {}}, "f:spec": {"f:affinity": {".": {}, "f:podAntiAffinity": {".": {}, "f:requiredDuringSche
dulingIgnoredDuringExecution": {}}}, "f:containers": {"k:{\\"name\\":\\"postgres\\"}": {".": {}, "f:env": {".": {}, "k:{\\"name\\":\\"DCS_ENABLE_KUBERNETES_API\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"ENABLE_WAL_PATH_COMPAT\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"HUMAN_ROLE\\"}": {".": {}, "f:name": {}, "f:v
alue": {}}, "k:{\\"name\\":\\"KUBERNETES_LABELS\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"KUBERNETES_ROLE_LABEL\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"KUBERNETES_SCOPE_LABEL\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"PAM_OAUTH2\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\"
:\\"PGPASSWORD_STANDBY\\"}": {".": {}, "f:name": {}, "f:valueFrom": {".": {}, "f:secretKeyRef": {".": {}, "f:key": {}, "f:name": {}}}}, "k:{\\"name\\":\\"PGPASSWORD_SUPERUSER\\"}": {".": {}, "f:name": {}, "f:valueFrom": {".": {}, "f:secretKeyRef": {".": {}, "f:key": {}, "f:name": {}}}}, "k:{\\"name\\":\\"PGROOT\\"}": {".": {}, "f:name": {}, "f:value": {}
}, "k:{\\"name\\":\\"PGUSER_STANDBY\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"PGUSER_SUPERUSER\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"PGVERSION\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"POD_IP\\"}": {".": {}, "f:name": {}, "f:valueFrom": {".": {}, "f:fieldRef": {".": {}, "f:apiVersion":
 {}, "f:fieldPath": {}}}}, "k:{\\"name\\":\\"POD_NAMESPACE\\"}": {".": {}, "f:name": {}, "f:valueFrom": {".": {}, "f:fieldRef": {".": {}, "f:apiVersion": {}, "f:fieldPath": {}}}}, "k:{\\"name\\":\\"SCOPE\\"}": {".": {}, "f:name": {}, "f:value": {}}, "k:{\\"name\\":\\"SPILO_CONFIGURATION\\"}": {".": {}, "f:name": {}, "f:value": {}}}, "f:image": {}, "f:ima
gePullPolicy": {}, "f:name": {}, "f:ports": {".": {}, "k:{\\"containerPort\\":5432,\\"protocol\\":\\"TCP\\"}": {".": {}, "f:containerPort": {}, "f:protocol": {}}, "k:{\\"containerPort\\":8008,\\"protocol\\":\\"TCP\\"}": {".": {}, "f:containerPort": {}, "f:protocol": {}}, "k:{\\"containerPort\\":8080,\\"protocol\\":\\"TCP\\"}": {".": {}, "f:containerPort"
: {}, "f:protocol": {}}}, "f:resources": {".": {}, "f:limits": {".": {}, "f:cpu": {}, "f:memory": {}}, "f:requests": {".": {}, "f:cpu": {}, "f:memory": {}}}, "f:securityContext": {".": {}, "f:privileged": {}, "f:readOnlyRootFilesystem": {}}, "f:terminationMessagePath": {}, "f:terminationMessagePolicy": {}, "f:volumeMounts": {".": {}, "k:{\\"mountPath\\":
\\"/dev/shm\\"}": {".": {}, "f:mountPath": {}, "f:name": {}}, "k:{\\"mountPath\\":\\"/home/postgres/pgdata\\"}": {".": {}, "f:mountPath": {}, "f:name": {}}, "k:{\\"mountPath\\":\\"/opt/empty\\"}": {".": {}, "f:mountPath": {}, "f:name": {}}}}}, "f:dnsPolicy": {}, "f:initContainers": {".": {}, "k:{\\"name\\":\\"date\\"}": {".": {}, "f:command": {}, "f:imag
e": {}, "f:imagePullPolicy": {}, "f:name": {}, "f:resources": {}, "f:terminationMessagePath": {}, "f:terminationMessagePolicy": {}}}, "f:restartPolicy": {}, "f:schedulerName": {}, "f:securityContext": {}, "f:serviceAccount": {}, "f:serviceAccountName": {}, "f:terminationGracePeriodSeconds": {}, "f:volumes": {".": {}, "k:{\\"name\\":\\"dshm\\"}": {".": {}
, "f:emptyDir": {".": {}, "f:medium": {}}, "f:name": {}}, "k:{\\"name\\":\\"empty\\"}": {".": {}, "f:emptyDir": {}, "f:name": {}}}}}, "f:updateStrategy": {"f:type": {}}, "f:volumeClaimTemplates": {}}}}, {"manager": "kube-controller-manager", "operation": "Update", "apiVersion": "apps/v1", "time": "2021-08-16T08:53:28Z", "fieldsType": "FieldsV1", "fieldsV
1": {"f:status": {"f:collisionCount": {}, "f:currentRevision": {}, "f:observedGeneration": {}, "f:readyReplicas": {}, "f:replicas": {}, "f:updateRevision": {}, "f:updatedReplicas": {}}}}]}, "spec": {"replicas": 0, "selector": {"matchLabels": {"application": "spilo", "cluster-name": "acid-postgres-cluster"}}, "template": {"metadata": {"namespace": "defaul
t", "creationTimestamp": null, "labels": {"application": "spilo", "cluster-name": "acid-postgres-cluster", "team": "acid"}, "annotations": {"backup.velero.io/backup-volumes": "pgdata"}}, "spec": {"volumes": [{"name": "dshm", "emptyDir": {"medium": "Memory"}}, {"name": "empty", "emptyDir": {}}], "initContainers": [{"name": "date", "image": "busybox", "com
mand": ["/bin/date"], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "imagePullPolicy": "Always"}], "containers": [{"name": "postgres", "image": "registry.opensource.zalan.do/acid/spilo-13:2.0-p2", "ports": [{"containerPort": 8008, "protocol": "TCP"}, {"containerPort": 5432, "protocol": "TCP"}, {"co
ntainerPort": 8080, "protocol": "TCP"}], "env": [{"name": "SCOPE", "value": "acid-postgres-cluster"}, {"name": "PGROOT", "value": "/home/postgres/pgdata/pgroot"}, {"name": "POD_IP", "valueFrom": {"fieldRef": {"apiVersion": "v1", "fieldPath": "status.podIP"}}}, {"name": "POD_NAMESPACE", "valueFrom": {"fieldRef": {"apiVersion": "v1", "fieldPath": "metadata
.namespace"}}}, {"name": "PGUSER_SUPERUSER", "value": "postgres"}, {"name": "KUBERNETES_SCOPE_LABEL", "value": "cluster-name"}, {"name": "KUBERNETES_ROLE_LABEL", "value": "spilo-role"}, {"name": "PGPASSWORD_SUPERUSER", "valueFrom": {"secretKeyRef": {"name": "postgres.acid-postgres-cluster.credentials", "key": "password"}}}, {"name": "PGUSER_STANDBY", "va
lue": "standby"}, {"name": "PGPASSWORD_STANDBY", "valueFrom": {"secretKeyRef": {"name": "standby.acid-postgres-cluster.credentials", "key": "password"}}}, {"name": "PAM_OAUTH2", "value": "https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees"}, {"name": "HUMAN_ROLE", "value": "zalandos"}, {"name": "PGVERSION", "value": "13"}, {"nam
e": "KUBERNETES_LABELS", "value": "{\\"application\\":\\"spilo\\"}"}, {"name": "SPILO_CONFIGURATION", "value": "{\\"postgresql\\":{\\"parameters\\":{\\"log_statement\\":\\"none\\",\\"shared_buffers\\":\\"4GB\\",\\"tcp_keepalives_count\\":\\"5\\",\\"tcp_keepalives_idle\\":\\"60\\",\\"tcp_keepalives_interval\\":\\"60\\"},\\"pg_hba\\":[\\"hostssl all all 0.
0.0.0/0 md5\\",\\"host    all all 0.0.0.0/0 md5\\",\\"hostssl replication postgres 0.0.0.0/0 md5\\",\\"host replication postgres 0.0.0.0/0 md5\\",\\"local   all             all                                   trust\\",\\"hostssl all             +zalandos    127.0.0.1/32       pam\\",\\"host    all             all                127.0.0.1/32       md5\\
",\\"hostssl all             +zalandos    ::1/128            pam\\",\\"host    all             all                ::1/128            md5\\",\\"hostssl replication     standby all                md5\\",\\"hostnossl all           all                all                reject\\",\\"hostssl all             +zalandos    all                pam\\",\\"hostssl all
             all                all                md5\\"]},\\"bootstrap\\":{\\"initdb\\":[{\\"auth-host\\":\\"md5\\"},{\\"auth-local\\":\\"trust\\"},\\"data-checksums\\",{\\"encoding\\":\\"UTF8\\"},{\\"locale\\":\\"en_US.UTF-8\\"}],\\"users\\":{\\"zalandos\\":{\\"password\\":\\"\\",\\"options\\":[\\"CREATEDB\\",\\"NOLOGIN\\"]}},\\"dcs\\":{\\"ttl\\":30,\
\"loop_wait\\":10,\\"retry_timeout\\":10,\\"maximum_lag_on_failover\\":33554432,\\"postgresql\\":{\\"parameters\\":{\\"max_connections\\":\\"300\\"}}}}}"}, {"name": "DCS_ENABLE_KUBERNETES_API", "value": "true"}, {"name": "ENABLE_WAL_PATH_COMPAT", "value": "true"}], "resources": {"limits": {"cpu": "5", "memory": "5000Mi"}, "requests": {"cpu": "10m", "memo
ry": "100Mi"}}, "volumeMounts": [{"name": "pgdata", "mountPath": "/home/postgres/pgdata"}, {"name": "dshm", "mountPath": "/dev/shm"}, {"name": "empty", "mountPath": "/opt/empty"}], "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "imagePullPolicy": "IfNotPresent", "securityContext": {"privileged": false, "readOnlyRoot
Filesystem": false}}], "restartPolicy": "Always", "terminationGracePeriodSeconds": 300, "dnsPolicy": "ClusterFirst", "serviceAccountName": "postgres-pod", "serviceAccount": "postgres-pod", "securityContext": {}, "affinity": {"podAntiAffinity": {"requiredDuringSchedulingIgnoredDuringExecution": [{"labelSelector": {"matchLabels": {"application": "spilo", "
cluster-name": "acid-postgres-cluster", "team": "acid"}}, "topologyKey": "kubernetes.io/hostname"}]}}, "schedulerName": "default-scheduler"}}, "volumeClaimTemplates": [{"kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": {"name": "pgdata", "creationTimestamp": null, "annotations": {"volume.beta.kubernetes.io/storage-class": "rook-ceph-block"
}}, "spec": {"accessModes": ["ReadWriteOnce"], "resources": {"requests": {"storage": "10G"}}, "storageClassName": "rook-ceph-block", "volumeMode": "Filesystem"}, "status": {"phase": "Pending"}}], "serviceName": "acid-postgres-cluster", "podManagementPolicy": "OrderedReady", "updateStrategy": {"type": "OnDelete"}, "revisionHistoryLimit": 10}, "status": {"
observedGeneration": 41, "replicas": 1, "readyReplicas": 1, "updatedReplicas": 1, "currentRevision": "acid-postgres-cluster-9d6b6d9d9", "updateRevision": "acid-postgres-cluster-6b4cfd4c76", "collisionCount": 0}}, "changed": true, "diff": {"before": {"metadata": {"generation": 41, "resourceVersion": "284322130"}, "spec": {"replicas": 1}}, "after": {"metad
ata": {"generation": 42, "resourceVersion": "284323732"}, "spec": {"replicas": 0}}}, "duration": 0, "invocation": {"module_args": {"namespace": "default", "wait": true, "api_version": "v1", "replicas": 0, "wait_timeout": 600, "kind": "StatefulSet", "name": "acid-postgres-cluster", "current_replicas": null, "resource_version": null, "resource_definition":
 null, "src": null, "kubeconfig": null, "context": null, "host": null, "api_key": null, "username": null, "password": null, "validate_certs": null, "ca_cert": null, "client_cert": null, "client_key": null, "proxy": null, "persist_config": null}}}\r\n', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /hom
e/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3
: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit statu
s from master 0\r\nShared connection to 10.83.19.20 closed.\r\n')
<10.83.19.20> ESTABLISH SSH CONNECTION FOR USER: wmd
<10.83.19.20> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="wmd"' -o ConnectTimeout=10 -o ControlPath=/home/haroon/.ansible/cp/1760d9aee3 10.83.19.20 '/bin/sh -c '"'"'rm -f -r /home/wmd
/.ansible/tmp/ansible-tmp-1629104222.84-19303-102935503308507/ > /dev/null 2>&1 && sleep 0'"'"''
<10.83.19.20> (0, '', 'OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017\r\ndebug1: Reading configuration data /home/haroon/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2:
 mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 19295\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_se
ssion: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
changed: [fs-m1] => (item=[u'StatefulSet', u'acid-postgres-cluster', u'default', u'0']) => {
    "ansible_loop_var": "item",
    "changed": true,
    "diff": {
        "after": {
            "metadata": {
                "generation": 42,
                "resourceVersion": "284323732"
            },
            "spec": {
                "replicas": 0
            }
        },
        "before": {
            "metadata": {
                "generation": 41,
                "resourceVersion": "284322130"
            },
            "spec": {
                "replicas": 1
            }
        }
    },
    "duration": 0,
    "invocation": {
        "module_args": {
            "api_key": null,
            "api_version": "v1",
            "ca_cert": null,
            "client_cert": null,
            "client_key": null,
            "context": null,
            "current_replicas": null,
            "host": null,
            "kind": "StatefulSet",
            "kubeconfig": null,
            "name": "acid-postgres-cluster",
            "namespace": "default",
            "password": null,
            "persist_config": null,
            "proxy": null,
            "replicas": 0,
            "resource_definition": null,
            "resource_version": null,
            "src": null,
            "username": null,
            "validate_certs": null,
            "wait": true,
            "wait_timeout": 600
        }
    },
    "item": [
        "StatefulSet",
        "acid-postgres-cluster",
        "default",
        "0"
    ],
    "result": {
        "apiVersion": "apps/v1",
        "kind": "StatefulSet",
        "metadata": {
            "annotations": {
                "zalando-postgres-operator-rolling-update-required": "false"
            },
            "creationTimestamp": "2021-07-27T11:25:58Z",
            "generation": 42,
            "labels": {
                "application": "spilo",
                "cluster-name": "acid-postgres-cluster",
                "team": "acid"
            },
            "managedFields": [
                {
                    "apiVersion": "apps/v1",
                    "fieldsType": "FieldsV1",
                    "fieldsV1": {
                        "f:metadata": {
                            "f:annotations": {
                                ".": {},
                                "f:zalando-postgres-operator-rolling-update-required": {}
                            },
                            "f:labels": {
                                ".": {},
                                "f:application": {},
                                "f:cluster-name": {},
                                "f:team": {}
                            }
                        },
                        "f:spec": {
                            "f:podManagementPolicy": {},
                            "f:replicas": {},
                            "f:revisionHistoryLimit": {},
                            "f:selector": {},
                            "f:serviceName": {},
                            "f:template": {
                                "f:metadata": {
                                    "f:annotations": {
                                        ".": {},
                                        "f:backup.velero.io/backup-volumes": {}
                                    },
                                    "f:labels": {
                                        ".": {},
                                        "f:application": {},
                                        "f:cluster-name": {},
                                        "f:team": {}
                                    },
                                    "f:namespace": {}
                                },
                                "f:spec": {
                                    "f:affinity": {
                                        ".": {},
                                        "f:podAntiAffinity": {
                                            ".": {},
                                            "f:requiredDuringSchedulingIgnoredDuringExecution": {}
                                        }
                                    },
                                    "f:containers": {
                                        "k:{\"name\":\"postgres\"}": {
                                            ".": {},
                                            "f:env": {
                                                ".": {},
                                                "k:{\"name\":\"DCS_ENABLE_KUBERNETES_API\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"ENABLE_WAL_PATH_COMPAT\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"HUMAN_ROLE\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"KUBERNETES_LABELS\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"KUBERNETES_ROLE_LABEL\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"KUBERNETES_SCOPE_LABEL\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"PAM_OAUTH2\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"PGPASSWORD_STANDBY\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:valueFrom": {
                                                        ".": {},
                                                        "f:secretKeyRef": {
                                                            ".": {},
                                                            "f:key": {},
                                                            "f:name": {}
                                                        }
                                                    }
                                                },
                                                "k:{\"name\":\"PGPASSWORD_SUPERUSER\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:valueFrom": {
                                                        ".": {},
                                                        "f:secretKeyRef": {
                                                            ".": {},
                                                            "f:key": {},
                                                            "f:name": {}
                                                        }
                                                    }
                                                },
                                                "k:{\"name\":\"PGROOT\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"PGUSER_STANDBY\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"PGUSER_SUPERUSER\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"PGVERSION\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"POD_IP\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:valueFrom": {
                                                        ".": {},
                                                        "f:fieldRef": {
                                                            ".": {},
                                                            "f:apiVersion": {},
                                                            "f:fieldPath": {}
                                                        }
                                                    }
                                                },
                                                "k:{\"name\":\"POD_NAMESPACE\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:valueFrom": {
                                                        ".": {},
                                                        "f:fieldRef": {
                                                            ".": {},
                                                            "f:apiVersion": {},
                                                            "f:fieldPath": {}
                                                        }
                                                    }
                                                },
                                                "k:{\"name\":\"SCOPE\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                },
                                                "k:{\"name\":\"SPILO_CONFIGURATION\"}": {
                                                    ".": {},
                                                    "f:name": {},
                                                    "f:value": {}
                                                }
                                            },
                                            "f:image": {},
                                            "f:imagePullPolicy": {},
                                            "f:name": {},
                                            "f:ports": {
                                                ".": {},
                                                "k:{\"containerPort\":5432,\"protocol\":\"TCP\"}": {
                                                    ".": {},
                                                    "f:containerPort": {},
                                                    "f:protocol": {}
                                                },
                                                "k:{\"containerPort\":8008,\"protocol\":\"TCP\"}": {
                                                    ".": {},
                                                    "f:containerPort": {},
                                                    "f:protocol": {}
                                                },
                                                "k:{\"containerPort\":8080,\"protocol\":\"TCP\"}": {
                                                    ".": {},
                                                    "f:containerPort": {},
                                                    "f:protocol": {}
                                                }
                                            },
                                            "f:resources": {
                                                ".": {},
                                                "f:limits": {
                                                    ".": {},
                                                    "f:cpu": {},
                                                    "f:memory": {}
                                                },
                                                "f:requests": {
                                                    ".": {},
                                                    "f:cpu": {},
                                                    "f:memory": {}
                                                }
                                            },
                                            "f:securityContext": {
                                                ".": {},
                                                "f:privileged": {},
                                                "f:readOnlyRootFilesystem": {}
                                            },
                                            "f:terminationMessagePath": {},
                                            "f:terminationMessagePolicy": {},
                                            "f:volumeMounts": {
                                                ".": {},
                                                "k:{\"mountPath\":\"/dev/shm\"}": {
                                                    ".": {},
                                                    "f:mountPath": {},
                                                    "f:name": {}
                                                },
                                                "k:{\"mountPath\":\"/home/postgres/pgdata\"}": {
                                                    ".": {},
                                                    "f:mountPath": {},
                                                    "f:name": {}
                                                },
                                                "k:{\"mountPath\":\"/opt/empty\"}": {
                                                    ".": {},
                                                    "f:mountPath": {},
                                                    "f:name": {}
                                                }
                                            }
                                        }
                                    },
                                    "f:dnsPolicy": {},
                                    "f:initContainers": {
                                        ".": {},
                                        "k:{\"name\":\"date\"}": {
                                            ".": {},
                                            "f:command": {},
                                            "f:image": {},
                                            "f:imagePullPolicy": {},
                                            "f:name": {},
                                            "f:resources": {},
                                            "f:terminationMessagePath": {},
                                            "f:terminationMessagePolicy": {}
                                        }
                                    },
                                    "f:restartPolicy": {},
                                    "f:schedulerName": {},
                                    "f:securityContext": {},
                                    "f:serviceAccount": {},
                                    "f:serviceAccountName": {},
                                    "f:terminationGracePeriodSeconds": {},
                                    "f:volumes": {
                                        ".": {},
                                        "k:{\"name\":\"dshm\"}": {
                                            ".": {},
                                            "f:emptyDir": {
                                                ".": {},
                                                "f:medium": {}
                                            },
                                            "f:name": {}
                                        },
                                        "k:{\"name\":\"empty\"}": {
                                            ".": {},
                                            "f:emptyDir": {},
                                            "f:name": {}
                                        }
                                    }
                                }
                            },
                            "f:updateStrategy": {
                                "f:type": {}
                            },
                            "f:volumeClaimTemplates": {}
                        }
                    },
                    "manager": "postgres-operator",
                    "operation": "Update",
                    "time": "2021-07-27T12:28:03Z"
                },
                {
                    "apiVersion": "apps/v1",
                    "fieldsType": "FieldsV1",
                    "fieldsV1": {
                        "f:status": {
                            "f:collisionCount": {},
                            "f:currentRevision": {},
                            "f:observedGeneration": {},
                            "f:readyReplicas": {},
                            "f:replicas": {},
                            "f:updateRevision": {},
                            "f:updatedReplicas": {}
                        }
                    },
                    "manager": "kube-controller-manager",
                    "operation": "Update",
                    "time": "2021-08-16T08:53:28Z"
                }
            ],
            "name": "acid-postgres-cluster",
            "namespace": "default",
            "resourceVersion": "284323732",
            "uid": "0d1b56a2-42c1-4a4c-a824-44523c4c4a56"
        },
        "spec": {
            "podManagementPolicy": "OrderedReady",
            "replicas": 0,
            "revisionHistoryLimit": 10,
            "selector": {
                "matchLabels": {
                    "application": "spilo",
                    "cluster-name": "acid-postgres-cluster"
                }
            },
            "serviceName": "acid-postgres-cluster",
            "template": {
                "metadata": {
                    "annotations": {
                        "backup.velero.io/backup-volumes": "pgdata"
                    },
                    "creationTimestamp": null,
                    "labels": {
                        "application": "spilo",
                        "cluster-name": "acid-postgres-cluster",
                        "team": "acid"
                    },
                    "namespace": "default"
                },
                "spec": {
                    "affinity": {
                        "podAntiAffinity": {
                            "requiredDuringSchedulingIgnoredDuringExecution": [
                                {
                                    "labelSelector": {
                                        "matchLabels": {
                                            "application": "spilo",
                                            "cluster-name": "acid-postgres-cluster",
                                            "team": "acid"
                                        }
                                    },
                                    "topologyKey": "kubernetes.io/hostname"
                                }
                            ]
                        }
                    },
                    "containers": [
                        {
                            "env": [
                                {
                                    "name": "SCOPE",
                                    "value": "acid-postgres-cluster"
                                },
                                {
                                    "name": "PGROOT",
                                    "value": "/home/postgres/pgdata/pgroot"
                                },
                                {
                                    "name": "POD_IP",
                                    "valueFrom": {
                                        "fieldRef": {
                                            "apiVersion": "v1",
                                            "fieldPath": "status.podIP"
                                        }
                                    }
                                },
                                {
                                    "name": "POD_NAMESPACE",
                                    "valueFrom": {
                                        "fieldRef": {
                                            "apiVersion": "v1",
                                            "fieldPath": "metadata.namespace"
                                        }
                                    }
                                },
                                {
                                    "name": "PGUSER_SUPERUSER",
                                    "value": "postgres"
                                },
                                {
                                    "name": "KUBERNETES_SCOPE_LABEL",
                                    "value": "cluster-name"
                                },
                                {
                                    "name": "KUBERNETES_ROLE_LABEL",
                                    "value": "spilo-role"
                                },
                                {
                                    "name": "PGPASSWORD_SUPERUSER",
                                    "valueFrom": {
                                        "secretKeyRef": {
                                            "key": "password",
                                            "name": "postgres.acid-postgres-cluster.credentials"
                                        }
                                    }
                                },
                                {
                                    "name": "PGUSER_STANDBY",
                                    "value": "standby"
                                },
                                {
                                    "name": "PGPASSWORD_STANDBY",
                                    "valueFrom": {
                                        "secretKeyRef": {
                                            "key": "password",
                                            "name": "standby.acid-postgres-cluster.credentials"
                                        }
                                    }
                                },
                                {
                                    "name": "PAM_OAUTH2",
                                    "value": "https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees"
                                },
                                {
                                    "name": "HUMAN_ROLE",
                                    "value": "zalandos"
                                },
                                {
                                    "name": "PGVERSION",
                                    "value": "13"
                                },
                                {
                                    "name": "KUBERNETES_LABELS",
                                    "value": "{\"application\":\"spilo\"}"
                                },
                                {
                                    "name": "SPILO_CONFIGURATION",
                                    "value": "{\"postgresql\":{\"parameters\":{\"log_statement\":\"none\",\"shared_buffers\":\"4GB\",\"tcp_keepalives_count\":\"5\",\"tcp_keepalives_idle\":\"60\",\"tcp_keepalives_interval\":\"60\"},\"pg_hba\":[\"hostssl all all 0.0.0.0/0 md5\",\"host    all all 0.0.0.0/0 md5\",\"hostssl replication postgres 0.0.0.0/0 md5\
",\"host replication postgres 0.0.0.0/0 md5\",\"local   all             all                                   trust\",\"hostssl all             +zalandos    127.0.0.1/32       pam\",\"host    all             all                127.0.0.1/32       md5\",\"hostssl all             +zalandos    ::1/128            pam\",\"host    all             all
     ::1/128            md5\",\"hostssl replication     standby all                md5\",\"hostnossl all           all                all                reject\",\"hostssl all             +zalandos    all                pam\",\"hostssl all             all                all                md5\"]},\"bootstrap\":{\"initdb\":[{\"auth-host\":\"md5\"},{\"auth
-local\":\"trust\"},\"data-checksums\",{\"encoding\":\"UTF8\"},{\"locale\":\"en_US.UTF-8\"}],\"users\":{\"zalandos\":{\"password\":\"\",\"options\":[\"CREATEDB\",\"NOLOGIN\"]}},\"dcs\":{\"ttl\":30,\"loop_wait\":10,\"retry_timeout\":10,\"maximum_lag_on_failover\":33554432,\"postgresql\":{\"parameters\":{\"max_connections\":\"300\"}}}}}"
                                },
                                {
                                    "name": "DCS_ENABLE_KUBERNETES_API",
                                    "value": "true"
                                },
                                {
                                    "name": "ENABLE_WAL_PATH_COMPAT",
                                    "value": "true"
                                }
                            ],
                            "image": "registry.opensource.zalan.do/acid/spilo-13:2.0-p2",
                            "imagePullPolicy": "IfNotPresent",
                            "name": "postgres",
                            "ports": [
                                {
                                    "containerPort": 8008,
                                    "protocol": "TCP"
                                },
                                {
                                    "containerPort": 5432,
                                    "protocol": "TCP"
                                },
                                {
                                    "containerPort": 8080,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {
                                "limits": {
                                    "cpu": "5",
                                    "memory": "5000Mi"
                                },
                                "requests": {
                                    "cpu": "10m",
                                    "memory": "100Mi"
                                }
                            },
                            "securityContext": {
                                "privileged": false,
                                "readOnlyRootFilesystem": false
                            },
                            "terminationMessagePath": "/dev/termination-log",
                            "terminationMessagePolicy": "File",
                            "volumeMounts": [
                                {
                                    "mountPath": "/home/postgres/pgdata",
                                    "name": "pgdata"
                                },
                                {
                                    "mountPath": "/dev/shm",
                                    "name": "dshm"
                                },
                                {
                                    "mountPath": "/opt/empty",
                                    "name": "empty"
                                }
                            ]
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "initContainers": [
                        {
                            "command": [
                                "/bin/date"
                            ],
                            "image": "busybox",
                            "imagePullPolicy": "Always",
                            "name": "date",
                            "resources": {},
                            "terminationMessagePath": "/dev/termination-log",
                            "terminationMessagePolicy": "File"
                        }
                    ],
                    "restartPolicy": "Always",
                    "schedulerName": "default-scheduler",
                    "securityContext": {},
                    "serviceAccount": "postgres-pod",
                    "serviceAccountName": "postgres-pod",
                    "terminationGracePeriodSeconds": 300,
                    "volumes": [
                        {
                            "emptyDir": {
                                "medium": "Memory"
                            },
                            "name": "dshm"
                        },
                        {
                            "emptyDir": {},
                            "name": "empty"
                        }
                    ]
                }
            },
            "updateStrategy": {
                "type": "OnDelete"
            },
            "volumeClaimTemplates": [
                {
                    "apiVersion": "v1",
                    "kind": "PersistentVolumeClaim",
                    "metadata": {
                        "annotations": {
                            "volume.beta.kubernetes.io/storage-class": "rook-ceph-block"
                        },
                        "creationTimestamp": null,
                        "name": "pgdata"
                    },
                    "spec": {
                        "accessModes": [
                            "ReadWriteOnce"
                        ],
                        "resources": {
                            "requests": {
                                "storage": "10G"
                            }
                        },
                        "storageClassName": "rook-ceph-block",
                        "volumeMode": "Filesystem"
                    },
                    "status": {
                        "phase": "Pending"
                    }
                }
            ]
        },
        "status": {
            "collisionCount": 0,
            "currentRevision": "acid-postgres-cluster-9d6b6d9d9",
            "observedGeneration": 41,
            "readyReplicas": 1,
            "replicas": 1,
            "updateRevision": "acid-postgres-cluster-6b4cfd4c76",
            "updatedReplicas": 1
        }
    }
}
@gravesm gravesm added needs_verify type/bug Something isn't working labels Aug 17, 2021
@abikouo
Copy link
Contributor

abikouo commented Sep 17, 2021

Hi @haroonb,

Thanks for taking the times to report this issue.
I tried to reproduce but was not able, using this playbook

- hosts: localhost
  gather_facts: no

  collections:
  - kubernetes.core
  - community.okd
  
  tasks:
    - name: Ensure namespace
      k8s:
        kind: namespace
        name: test

    - name: Create deployment assert that it reachs its state
      k8s:
        namespace: test
        definition:
          kind: Deployment
          apiVersion: apps/v1
          metadata:
            name: busy
          spec:
            replicas: 3
            selector:
              matchLabels:
                deploy: example
            template:
              metadata:
                labels:
                  deploy: example
              spec:
                containers:
                - name: busy
                  image: busybox
                  command:
                    - /bin/sh
                    - -c
                    - while true;do date;sleep 5; done

    - name: Get deployment
      k8s_info:
        kind: Deployment
        namespace: test
        name: busy
      register: result

    - debug:
        msg: "number of replicas: {{ result.resources[0]['status']['replicas'] }}"

    - name: scale down deployment
      k8s_scale:
        api_version: v1
        kind: Deployment
        name: busy
        namespace: test
        replicas: 0
        wait: yes
        wait_timeout: 600
      register: scale_r

    - name: Get deployment
      k8s_info:
        kind: Deployment
        namespace: test
        name: busy
      register: result

    - debug: var=result.resources[0]['status']

Here is the output:

PLAY [localhost] ************************************************************************************************************************************************************

TASK [Ensure namespace] *****************************************************************************************************************************************************
ok: [localhost]

TASK [Create deployment assert that it reachs its state] ********************************************************************************************************************
changed: [localhost]

TASK [Get deployment] *******************************************************************************************************************************************************
ok: [localhost]

TASK [debug] ****************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "number of replicas: 3"
}

TASK [scale down deployment] ************************************************************************************************************************************************
changed: [localhost]

TASK [Get deployment] *******************************************************************************************************************************************************
ok: [localhost]

TASK [debug] ****************************************************************************************************************************************************************
ok: [localhost] => {
    "result.resources[0]['status']": {
        "conditions": [
            {
                "lastTransitionTime": "2021-09-17T10:22:44Z",
                "lastUpdateTime": "2021-09-17T10:22:45Z",
                "message": "ReplicaSet \"busy-67bb47445f\" has successfully progressed.",
                "reason": "NewReplicaSetAvailable",
                "status": "True",
                "type": "Progressing"
            },
            {
                "lastTransitionTime": "2021-09-17T10:50:50Z",
                "lastUpdateTime": "2021-09-17T10:50:50Z",
                "message": "Deployment has minimum availability.",
                "reason": "MinimumReplicasAvailable",
                "status": "True",
                "type": "Available"
            }
        ],
        "observedGeneration": 12
    }
}

As you can see the code uses to wait is expecting the resource to reach the desired state:

def _deployment_ready(deployment):
# FIXME: frustratingly bool(deployment.status) is True even if status is empty
# Furthermore deployment.status.availableReplicas == deployment.status.replicas == None if status is empty
# deployment.status.replicas is None is perfectly ok if desired replicas == 0
# Scaling up means that we also need to check that we're not in a
# situation where status.replicas == status.availableReplicas
# but spec.replicas != status.replicas
return (deployment.status
and deployment.spec.replicas == (deployment.status.replicas or 0)
and deployment.status.availableReplicas == deployment.status.replicas
and deployment.status.observedGeneration == deployment.metadata.generation
and not deployment.status.unavailableReplicas)
def _pod_ready(pod):
return (pod.status and pod.status.containerStatuses is not None
and all(container.ready for container in pod.status.containerStatuses))
def _daemonset_ready(daemonset):
return (daemonset.status and daemonset.status.desiredNumberScheduled is not None
and daemonset.status.updatedNumberScheduled == daemonset.status.desiredNumberScheduled
and daemonset.status.numberReady == daemonset.status.desiredNumberScheduled
and daemonset.status.observedGeneration == daemonset.metadata.generation
and not daemonset.status.unavailableReplicas)
def _statefulset_ready(statefulset):
return (statefulset.status and statefulset.spec.updateStrategy.type == "RollingUpdate"
and statefulset.status.observedGeneration == (statefulset.metadata.generation or 0)
and statefulset.status.updateRevision == statefulset.status.currentRevision
and statefulset.status.updatedReplicas == statefulset.spec.replicas
and statefulset.status.readyReplicas == statefulset.spec.replicas
and statefulset.status.replicas == statefulset.spec.replicas)

Could you please provide more details ? Which version of collection are you using ?

@abikouo abikouo added needs_info Needs additional information from original reporter and removed needs_verify labels Sep 17, 2021
@abikouo abikouo removed the type/bug Something isn't working label Sep 29, 2021
@haroonb
Copy link
Author

haroonb commented Feb 23, 2022

Hello @abikouo,

I'm sorry for the incredible late reply. I have some more information regarding this issue. I'm however unsure if I should open a new issue for this, since my setup has significantly changed in the meantime ( latest ansible )

SUMMARY

kubernetes.core.k8s_scale fails to scale statefulsets down. Scaling up works.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes.core.k8s_scale

ANSIBLE VERSION
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/butt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/butt/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
  jinja version = 2.10.1
  libyaml = True
COLLECTION VERSION
# /usr/lib/python3/dist-packages/ansible_collections
Collection      Version
--------------- -------
kubernetes.core 2.2.3

# /usr/share/ansible/collections/ansible_collections
Collection      Version
--------------- -------
kubernetes.core 2.2.3
CONFIGURATION
CALLBACKS_ENABLED(/etc/ansible/ansible.cfg) = ['profile_tasks']
DEFAULT_JINJA2_NATIVE(/etc/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT
STEPS TO REPRODUCE
       - name: Scale Keycloak down
         ignore_errors: yes
         kubernetes.core.k8s_scale:
           api_version: v1
           kind: "{{ item.kind }}"
           name: "{{ item.name }}"
           namespace: "{{ item.namespace }}"
           replicas: "{{ item.replicas }}"
           wait_timeout: 600
         loop:
           - { kind: 'Deployment', name:  'keycloak-operator', namespace: 'keycloak', replicas: '0'}
           - { kind: 'StatefulSet', name:  'keycloak', namespace: 'keycloak', replicas: '0'}
           
       - name: Scale Keycloak up
         ignore_errors: yes
         kubernetes.core.k8s_scale:
           api_version: v1
           kind: "{{ item.kind }}"
           name: "{{ item.name }}"
           namespace: "{{ item.namespace }}"
           replicas: "{{ item.replicas }}"
           wait_timeout: 600
         loop:
           - { kind: 'StatefulSet', name:  'keycloak', namespace: 'keycloak', replicas: '3'}
           - { kind: 'Deployment', name:  'keycloak-operator', namespace: 'keycloak', replicas: '1'}
EXPECTED RESULTS

correct scaling without errors

ACTUAL RESULTS

The module scales the deployment successfully
The module scales the statefulset successfully, but doesn't continue after the scaling is done, however seems to wait for the timeout and then fails.

The full traceback is:

https://gist.githubusercontent.com/haroonb/c0144044a8acb44bce93cc13e8df7437/raw/fb27c5a28c5ca7b65478942d8604f27a5df0a3f9/gistfile1.txt

@gravesm
Copy link
Member

gravesm commented Feb 23, 2022

@haroonb Thanks for the extra information. I'm able to reproduce this. Deployments work fine, but the wait logic for statefulsets has some incorrect assumptions.

@gravesm gravesm added type/bug Something isn't working and removed needs_info Needs additional information from original reporter labels Feb 23, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 11, 2022
Fix waiting on StatefulSet scale down

SUMMARY

When scaling a StatefulSet down to 0 replicas the wait will fail
because some properties of the status (readyReplicas, updatedReplicas)
will not exist. These are probably defined as omitempty in the API and
since the value is zero are not present in the response.

Fixes #203
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s_scale
ADDITIONAL INFORMATION

Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
StinkyBenji pushed a commit to StinkyBenji/ansible-tekton-demo that referenced this issue Nov 1, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[kubernetes.core](https://togithub.com/ansible-collections/kubernetes.core)
| galaxy-collection | minor | `2.2.3` -> `2.4.0` |

---

### Release Notes

<details>
<summary>ansible-collections/kubernetes.core (kubernetes.core)</summary>

###
[`v2.4.0`](https://togithub.com/ansible-collections/kubernetes.core/blob/HEAD/CHANGELOG.rst#v240)

[Compare
Source](https://togithub.com/ansible-collections/kubernetes.core/compare/2.3.2...2.4.0)

\======

## Major Changes

- refactor K8sAnsibleMixin into module_utils/k8s/
([ansible-collections/kubernetes.core#481).

## Minor Changes

- Adjust k8s_user_impersonation tests to be compatible with Kubernetes
1.24
([ansible-collections/kubernetes.core#520).
- add support for dry run with kubernetes client version >=18.20
([ansible-collections/kubernetes.core#245).
-   added ignore.txt for Ansible 2.14 devel branch.
- fixed module_defaults by removing routing hacks from runtime.yml
([ansible-collections/kubernetes.core#347).
- helm - add support for -set-file, -set-json, -set and -set-string
options when running helm install
([ansible-collections/kubernetes.core#533).
- helm - add support for helm dependency update
([ansible-collections/kubernetes.core#208).
- helm - add support for post-renderer flag
([ansible-collections/kubernetes.core#30).
- helm - add support for timeout cli parameter to allow setting Helm
timeout independent of wait
([ansible-collections/kubernetes.core#67).
- helm - add support for wait parameter for helm uninstall command.
(https://github.com/ansible-collections/kubernetes/core/issues/33).
- helm - support repo location for helm diff
([ansible-collections/kubernetes.core#174).
- helm - when ansible is executed in check mode, return the diff between
what's deployed and what will be deployed.
- helm, helm_plugin, helm_info, helm_plugin_info, kubectl - add support
for in-memory kubeconfig.
([ansible-collections/kubernetes.core#492).
- helm_info - add hooks, notes and manifest as part of returned
information
([ansible-collections/kubernetes.core#546).
- helm_info - add release state as a module argument
([ansible-collections/kubernetes.core#377).
- helm_info - added possibility to get all values by adding
get_all_values parameter
([ansible-collections/kubernetes.core#531).
- helm_plugin - Add plugin_version parameter to the helm_plugin module
([ansible-collections/kubernetes.core#157).
-   helm_plugin - Add support for helm plugin update using state=update.
- helm_repository - Ability to replace (overwrite) the repo if it
already exists by forcing
([ansible-collections/kubernetes.core#491).
- helm_repository - add support for pass-credentials cli parameter
([ansible-collections/kubernetes.core#282).
- helm_repository - added support for `host`, `api_key`,
`validate_certs`, and `ca_cert`.
- helm_repository - mark `pass_credentials` as no_log=True to silence
false warning
([ansible-collections/kubernetes.core#412).
- helm_template - add name (NAME of release) and disable_hook as
optional module arguments
([ansible-collections/kubernetes.core#313).
- helm_template - add show_only and release_namespace as module
arguments
([ansible-collections/kubernetes.core#313).
- helm_template - add support for -set-file, -set-json, -set and
-set-string options when running helm template
([ansible-collections/kubernetes.core#546).
- k8s - add no_proxy support to k8s\*
[ansible-collections/kubernetes.core#272).
- k8s - add support for server_side_apply.
([ansible-collections/kubernetes.core#87).
- k8s - add support for user impersonation.
(https://github.com/ansible-collections/kubernetes/core/issues/40).
- k8s - allow resource definition using metadata.generateName
([ansible-collections/kubernetes.core#35).
- k8s lookup plugin - Enable turbo mode via environment variable
([ansible-collections/kubernetes.core#291).
- k8s, k8s_scale, k8s_service - add support for resource definition as
manifest via.
([ansible-collections/kubernetes.core#451).
- k8s_cp - remove dependency with 'find' executable on remote pod when
state=from_pod
([ansible-collections/kubernetes.core#486).
- k8s_drain - Adds `delete_emptydir_data` option to
`k8s_drain.delete_options` to evict pods with an `emptyDir` volume
attached
([ansible-collections/kubernetes.core#322).
- k8s_exec - select first container from the pod if none specified
([ansible-collections/kubernetes.core#358).
- k8s_exec - update deprecation warning for `return_code`
([ansible-collections/kubernetes.core#417).
- k8s_json_patch - minor typo fix in the example section
([ansible-collections/kubernetes.core#411).
- k8s_log - add the `all_containers` for retrieving all containers' logs
in the pod(s).
- k8s_log - added the `previous` parameter for retrieving the previously
terminated pod logs
([ansible-collections/kubernetes.core#437).
- k8s_log - added the `tail_lines` parameter to limit the number of
lines to be retrieved from the end of the logs
([ansible-collections/kubernetes.core#488).
- k8s_rollback - add support for check_mode.
(https://github.com/ansible-collections/kubernetes/core/issues/243).
- k8s_scale - add support for check_mode.
(https://github.com/ansible-collections/kubernetes/core/issues/244).
- kubectl - wait for dd command to complete before proceeding
([ansible-collections/kubernetes.core#321).
- kubectl.py - replace distutils.spawn.find_executable with shutil.which
in the kubectl connection plugin
([ansible-collections/kubernetes.core#456).

## Bugfixes

- Fix dry_run logic - Pass the value dry_run=All instead of dry_run=True
to the client, add conditional check on kubernetes client version as
this feature is supported only for kubernetes >= 18.20.0
([ansible-collections/kubernetes.core#561).
- Fix kubeconfig parameter when multiple config files are provided
([ansible-collections/kubernetes.core#435).
- Helm - Fix issue with alternative kubeconfig provided with
validate_certs=False
([ansible-collections/kubernetes.core#538).
- Various modules and plugins - use vendored version of
`distutils.version` instead of the deprecated Python standard library
`distutils`
([ansible-collections/kubernetes.core#314).
- add missing documentation for filter plugin
kubernetes.core.k8s_config_resource_name
([ansible-collections/kubernetes.core#558).
- common - Ensure the label_selectors parameter of \_wait_for method is
optional.
-   common - handle `aliases` passed from inventory and lookup plugins.
- helm_template - evaluate release_values after values_files, insuring
highest precedence (now same behavior as in helm module).
([ansible-collections/kubernetes.core#348)
-   import exception from `kubernetes.client.rest`.
- k8s - Fix issue with check_mode when using server side apply
([ansible-collections/kubernetes.core#547).
- k8s - Fix issue with server side apply with kubernetes release
'25.3.0'
([ansible-collections/kubernetes.core#548).
- k8s_cp - add support for check_mode
([ansible-collections/kubernetes.core#380).
- k8s_drain - fix error caused by accessing an undefined variable when
pods have local storage
([ansible-collections/kubernetes.core#292).
- k8s_info - don't wait on empty List resources
([ansible-collections/kubernetes.core#253).
- k8s_info - fix issue when module returns successful true after the
resource cache has been established during periods where communication
to the api-server is not possible
([ansible-collections/kubernetes.core#508).
- k8s_log - Fix module traceback when no resource found
([ansible-collections/kubernetes.core#479).
- k8s_log - fix exception raised when the name is not provided for
resources requiring.
([ansible-collections/kubernetes.core#514)
- k8s_scale - fix waiting on statefulset when scaled down to 0 replicas
([ansible-collections/kubernetes.core#203).
- module_utils.common - change default opening mode to read-bytes to
avoid bad interpretation of non ascii characters and strings, often
present in 3rd party manifests.
- module_utils/k8s/client.py - fix issue when trying to authenticate
with host, client_cert and client_key parameters only.
- remove binary file from k8s_cp test suite
([ansible-collections/kubernetes.core#298).
- use resource prefix when finding resource and apiVersion is v1
([ansible-collections/kubernetes.core#351).

## New Modules

- helm_pull - download a chart from a repository and (optionally) unpack
it in local directory.

###
[`v2.3.2`](https://togithub.com/ansible-collections/kubernetes.core/compare/2.3.1...2.3.2)

[Compare
Source](https://togithub.com/ansible-collections/kubernetes.core/compare/2.3.1...2.3.2)

###
[`v2.3.1`](https://togithub.com/ansible-collections/kubernetes.core/blob/HEAD/CHANGELOG.rst#v231)

[Compare
Source](https://togithub.com/ansible-collections/kubernetes.core/compare/2.3.0...2.3.1)

\======

## Bugfixes

- Catch exception raised when the process is waiting for resources
([ansible-collections/kubernetes.core#407).
- Remove `omit` placeholder when defining resource using template
parameter
([ansible-collections/kubernetes.core#431).
- k8s - fix the issue when trying to delete resources using
label_selectors options
([ansible-collections/kubernetes.core#433).
- k8s_cp - fix issue when using parameter local_path with file on
managed node.
([ansible-collections/kubernetes.core#421).
- k8s_drain - fix error occurring when trying to drain node with
disable_eviction set to yes
([ansible-collections/kubernetes.core#416).

###
[`v2.3.0`](https://togithub.com/ansible-collections/kubernetes.core/blob/HEAD/CHANGELOG.rst#v230)

[Compare
Source](https://togithub.com/ansible-collections/kubernetes.core/compare/2.2.3...2.3.0)

\======

## Minor Changes

- add support for dry run with kubernetes client version >=18.20
([ansible-collections/kubernetes.core#245).
- fixed module_defaults by removing routing hacks from runtime.yml
([ansible-collections/kubernetes.core#347).
- helm - add support for timeout cli parameter to allow setting Helm
timeout independent of wait
([ansible-collections/kubernetes.core#67).
- helm - add support for wait parameter for helm uninstall command.
(https://github.com/ansible-collections/kubernetes/core/issues/33).
- helm - support repo location for helm diff
([ansible-collections/kubernetes.core#174).
- helm - when ansible is executed in check mode, return the diff between
what's deployed and what will be deployed.
- helm_info - add release state as a module argument
([ansible-collections/kubernetes.core#377).
- helm_plugin - Add plugin_version parameter to the helm_plugin module
([ansible-collections/kubernetes.core#157).
-   helm_plugin - Add support for helm plugin update using state=update.
- helm_repository - add support for pass-credentials cli parameter
([ansible-collections/kubernetes.core#282).
- helm_repository - added support for `host`, `api_key`,
`validate_certs`, and `ca_cert`.
- helm_template - add show_only and release_namespace as module
arguments
([ansible-collections/kubernetes.core#313).
- k8s - add no_proxy support to k8s\*
[ansible-collections/kubernetes.core#272).
- k8s - add support for server_side_apply.
([ansible-collections/kubernetes.core#87).
- k8s - add support for user impersonation.
(https://github.com/ansible-collections/kubernetes/core/issues/40).
- k8s - allow resource definition using metadata.generateName
([ansible-collections/kubernetes.core#35).
- k8s lookup plugin - Enable turbo mode via environment variable
([ansible-collections/kubernetes.core#291).
- k8s_drain - Adds `delete_emptydir_data` option to
`k8s_drain.delete_options` to evict pods with an `emptyDir` volume
attached
([ansible-collections/kubernetes.core#322).
- k8s_exec - select first container from the pod if none specified
([ansible-collections/kubernetes.core#358).
- k8s_rollback - add support for check_mode.
(https://github.com/ansible-collections/kubernetes/core/issues/243).
- k8s_scale - add support for check_mode.
(https://github.com/ansible-collections/kubernetes/core/issues/244).
- kubectl - wait for dd command to complete before proceeding
([ansible-collections/kubernetes.core#321).

## Bugfixes

- Various modules and plugins - use vendored version of
`distutils.version` instead of the deprecated Python standard library
`distutils`
([ansible-collections/kubernetes.core#314).
- common - Ensure the label_selectors parameter of \_wait_for method is
optional.
- helm_template - evaluate release_values after values_files, insuring
highest precedence (now same behavior as in helm module).
([ansible-collections/kubernetes.core#348)
-   import exception from `kubernetes.client.rest`.
- k8s_drain - fix error caused by accessing an undefined variable when
pods have local storage
([ansible-collections/kubernetes.core#292).
- k8s_info - don't wait on empty List resources
([ansible-collections/kubernetes.core#253).
- k8s_scale - fix waiting on statefulset when scaled down to 0 replicas
([ansible-collections/kubernetes.core#203).
- module_utils.common - change default opening mode to read-bytes to
avoid bad interpretation of non ascii characters and strings, often
present in 3rd party manifests.
- remove binary file from k8s_cp test suite
([ansible-collections/kubernetes.core#298).
- use resource prefix when finding resource and apiVersion is v1
([ansible-collections/kubernetes.core#351).

## New Modules

-   k8s_taint - Taint a node in a Kubernetes/OpenShift cluster

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/StinkyBenji/ansible-tekton-demo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants