From c30c162137146498dfd972628f3fb6b31934c71b Mon Sep 17 00:00:00 2001 From: Lewis Denny Date: Thu, 30 Jan 2025 12:21:39 +1000 Subject: [PATCH] [DNM] Test OCP 4.18 with some 4.17 operators --- .../tasks/install_operators.yml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/roles/kustomize_deploy/tasks/install_operators.yml b/roles/kustomize_deploy/tasks/install_operators.yml index eca39c58a2..b7b1eb9264 100644 --- a/roles/kustomize_deploy/tasks/install_operators.yml +++ b/roles/kustomize_deploy/tasks/install_operators.yml @@ -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 }}"