Skip to content

Commit

Permalink
[DNM] Testing manual install plan.
Browse files Browse the repository at this point in the history
  • Loading branch information
sathlan committed Jan 20, 2025
1 parent 53adb63 commit 456bf55
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions roles/kustomize_deploy/tasks/install_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,36 @@
- _cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources | length == 1
- (_cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources | first)['status']['installPlanRef'] is defined

- name: Retrieve the latest InstallPlan name sorted by creation date
set_fact:
installplan_name: >-
{{
_cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources
| selectattr('kind', 'equalto', 'Subscription')
| sort(attribute='metadata.creationTimestamp')
| map(attribute='status.installPlanRef.name')
| last
}}
- debug:
msg: "{{ installplan_name }}"

- name: Accept the InstallPlan
kubernetes.core.k8s:
api_version: operators.coreos.com/v1alpha1
kind: InstallPlan
name: "{{ installplan_name }}"
namespace: "openstack-operators"
state: present
merge_type:
- merge
definition:
spec:
approved: true

- debug:
msg: "========> INSTALLPLAN '{{ installplan_name }}' HAS BEEN APPROVED."

- name: Wait for the openstack operators InstallPlan to be finished
vars:
_install_plan: >-
Expand Down

0 comments on commit 456bf55

Please sign in to comment.