--- - name: scale down zuul-executor block: - name: Set executor replica set to 0 ansible.builtin.command: kubectl -n sf scale statefulsets zuul-executor --replicas=0 - name: Ensure executor pod is down ansible.builtin.shell: | kubectl -n sf get pods register: _is_pod_down until: - "'zuul-executor' not in _is_pod_down.stdout" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}" - name: scale down zuul-web block: - name: Set zuul-web replica set to 0 ansible.builtin.command: kubectl -n sf scale deployments zuul-web --replicas=0 - name: Ensure zuul-web pod is down ansible.builtin.shell: | kubectl -n sf get pods register: _is_pod_down until: - "'zuul-web' not in _is_pod_down.stdout" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}" - name: Run sf-operator and expect reconciliation ansible.builtin.shell: | set -o pipefail go run main.go {{ cli_global_flags }} deploy {{ cr_path }} args: chdir: "{{ zuul.project.src_dir }}" - name: Set executor replica set to 1 ansible.builtin.command: kubectl -n sf scale statefulsets zuul-executor --replicas=1 - name: Set web replica set to 1 ansible.builtin.command: kubectl -n sf scale deployments zuul-web --replicas=1 - name: Ensure executor pod is up ansible.builtin.shell: | kubectl -n sf get pods zuul-executor-0 register: _is_pod_up until: - "'Running' in _is_pod_up.stdout" - "'2/2' in _is_pod_up.stdout" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}" - name: Ensure web pod is up ansible.builtin.shell: | kubectl -n sf get pods --field-selector status.phase=Running register: _is_pod_up until: - "'zuul-web' in _is_pod_up.stdout" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}" - name: Run dry-run update detection test ansible.builtin.include_role: name: test-dry-run-update-detection