Skip to content

Commit

Permalink
Always specify api_version with k8s tasks using the Pod resource
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Apr 30, 2024
1 parent a79b434 commit 9035df1
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ jobs:
run: sudo -E .ci/scripts/galaxy_ng-tests.sh -m
shell: bash

# # TODO: Remove after testing
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: Backup & Restore
run: CI_TEST=galaxy .ci/scripts/backup_and_restore.sh -m
shell: bash
Expand All @@ -135,6 +131,7 @@ jobs:
- name: Logs
if: always()
run: .github/workflows/scripts/show_logs.sh

# - name: Debugging example (uncomment when needed)
# if: failure()
# uses: mxschmitt/action-tmate@v3
Expand Down
1 change: 1 addition & 0 deletions roles/backup/tasks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
k8s:
name: "{{ ansible_operator_meta.name }}-backup-manager"
kind: Pod
api_version: v1
namespace: "{{ backup_pvc_namespace }}"
state: absent
force: true
2 changes: 2 additions & 0 deletions roles/backup/tasks/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
k8s:
name: "{{ ansible_operator_meta.name }}-backup-manager"
kind: Pod
api_version: v1
namespace: "{{ backup_pvc_namespace }}"
state: absent
force: true
Expand Down Expand Up @@ -199,6 +200,7 @@
- name: Wait for backup management pod to be running
k8s_info:
kind: Pod
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
label_selectors:
- "app.kubernetes.io/component=backup-manager"
Expand Down
1 change: 1 addition & 0 deletions roles/backup/tasks/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- name: Get the postgres pod information
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ ansible_operator_meta.namespace }}'
label_selectors:
- "{{ postgres_label_selector }}"
Expand Down
1 change: 1 addition & 0 deletions roles/backup/tasks/remove_management_pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
k8s:
name: "{{ ansible_operator_meta.name }}-backup-manager"
kind: Pod
api_version: v1
namespace: "{{ backup_pvc_namespace }}"
state: absent
force: true
1 change: 1 addition & 0 deletions roles/galaxy-config/tasks/get_node_ip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
- name: Retrieve web pod
k8s_info:
kind: Pod
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
label_selectors:
- "app.kubernetes.io/instance = nginx-{{ ansible_operator_meta.name }}"
Expand Down
1 change: 1 addition & 0 deletions roles/galaxy-status/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- name: Get the resource pod information.
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ ansible_operator_meta.namespace }}'
label_selectors:
- "app.kubernetes.io/instance=nginx-{{ ansible_operator_meta.name }}"
Expand Down
1 change: 1 addition & 0 deletions roles/postgres/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- name: Get the old postgres pod (N-1)
kubernetes.core.k8s_info:
kind: Pod
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
label_selectors:
- "{{ postgres_label_selector }}"
Expand Down
1 change: 1 addition & 0 deletions roles/postgres/tasks/migrate_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- name: Get the postgres pod information
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ ansible_operator_meta.namespace }}'
label_selectors:
- "{{ postgres_label_selector }}"
Expand Down
1 change: 1 addition & 0 deletions roles/postgres/tasks/upgrade_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
- name: Get new postgres pod information
k8s_info:
kind: Pod
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
label_selectors:
- "{{ postgres_label_selector }}"
Expand Down
2 changes: 2 additions & 0 deletions roles/restore/tasks/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
k8s:
name: "{{ ansible_operator_meta.name }}-backup-manager"
kind: Pod
api_version: v1
namespace: "{{ backup_pvc_namespace }}"
state: absent
force: true
Expand All @@ -170,6 +171,7 @@
- name: Wait for restore management pod to be running
k8s_info:
kind: Pod
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
label_selectors:
- "app.kubernetes.io/component=backup-manager"
Expand Down
1 change: 1 addition & 0 deletions roles/restore/tasks/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
- name: Get the postgres pod information
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ ansible_operator_meta.namespace }}'
label_selectors:
- "{{ postgres_label_selector }}"
Expand Down
1 change: 1 addition & 0 deletions roles/restore/tasks/remove_management_pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
k8s:
name: "{{ ansible_operator_meta.name }}-backup-manager"
kind: Pod
api_version: v1
namespace: "{{ backup_pvc_namespace }}"
state: absent
force: true

0 comments on commit 9035df1

Please sign in to comment.