Skip to content

Commit

Permalink
[DNM] Test OCP 4.18 with some 4.17 operators
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisdenny committed Jan 30, 2025
1 parent 475d689 commit c30c162
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions roles/kustomize_deploy/tasks/install_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,55 @@
status: "True"
wait_timeout: 300

- name: Create 4.17 catalog source and switch nmstate and metallb to consume it
block:
- name: Write catalog source
kubernetes.core.k8s:
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
state: present
definition:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: redhat-operators-4.17
namespace: openshift-marketplace
spec:
displayName: Red Hat Operators 4.17
image: registry.redhat.io/redhat/redhat-operator-index:v4.17
publisher: Red Hat
sourceType: grpc
updateStrategy:
registryPoll:
interval: 10m

- name: Patch metallb operator subscription to use 4.17 operator
kubernetes.core.k8s:
state: patched
kind: Subscription
api_version: operators.coreos.com/v1alpha1
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
name: metallb-operator-sub
namespace: metallb-system
definition:
spec:
source: redhat-operators-4.17

- name: Patch nmstate operator subscription to use 4.17 operator
kubernetes.core.k8s:
state: patched
kind: Subscription
api_version: operators.coreos.com/v1alpha1
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
name: kubernetes-nmstate-operator
namespace: openshift-nmstate
definition:
spec:
source: redhat-operators-4.17

- name: Pause for 10 minutes to let everything settle
ansible.builtin.pause:
minutes: 10

- name: Wait until NMstate operator resources are deployed
kubernetes.core.k8s_info:
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
Expand Down

0 comments on commit c30c162

Please sign in to comment.