Upgrade to Operator SDK v1.22.2 (#1001)

* Upgrade to Operator SDK 1.16.0

* Upgrade Operator SDK to v1.22.2 & bump base image version
This commit is contained in:
Christian Adams
2022-08-22 18:54:56 -04:00
committed by GitHub
parent 5d0ebd0121
commit 7d2d1b3c5e
50 changed files with 1250 additions and 994 deletions

View File

@@ -2,37 +2,37 @@
- name: Set variables from awxbackup object statuses if provided
block:
- name: Look up details for the backup
k8s_info:
api_version: "{{ backup_api_version }}"
kind: "{{ backup_kind }}"
name: "{{ backup_name }}"
namespace: "{{ backup_pvc_namespace }}"
register: this_backup
- name: Look up details for the backup
k8s_info:
api_version: "{{ backup_api_version }}"
kind: "{{ backup_kind }}"
name: "{{ backup_name }}"
namespace: "{{ backup_pvc_namespace }}"
register: this_backup
- name: Surface error to user
block:
- name: Set error message
set_fact:
error_msg: "Cannot read the backup status variables for {{ backup_kind }} {{ backup_name }}."
- name: Surface error to user
block:
- name: Set error message
set_fact:
error_msg: "Cannot read the backup status variables for {{ backup_kind }} {{ backup_name }}."
- name: Handle error
import_tasks: error_handling.yml
- name: Handle error
import_tasks: error_handling.yml
- name: Fail early if pvc is defined but does not exist
fail:
msg: "{{ error_msg }}"
when:
- this_backup['resources'] | length == 0
- this_backup['resources'][0] is not defined
- this_backup['resources'][0]['status'] is not defined
- this_backup['resources'][0]['status']['backupClaim'] is not defined
- this_backup['resources'][0]['status']['backupDirectory'] is not defined
- name: Fail early if pvc is defined but does not exist
fail:
msg: "{{ error_msg }}"
when:
- this_backup['resources'] | length == 0
- this_backup['resources'][0] is not defined
- this_backup['resources'][0]['status'] is not defined
- this_backup['resources'][0]['status']['backupClaim'] is not defined
- this_backup['resources'][0]['status']['backupDirectory'] is not defined
- name: Set backup facts
set_fact:
backup_pvc: "{{ this_backup['resources'][0]['status']['backupClaim'] }}"
backup_dir: "{{ this_backup['resources'][0]['status']['backupDirectory'] }}"
- name: Set backup facts
set_fact:
backup_pvc: "{{ this_backup['resources'][0]['status']['backupClaim'] }}"
backup_dir: "{{ this_backup['resources'][0]['status']['backupDirectory'] }}"
when:
- backup_name != '' or backup_name is defined