From e220d895ae2a9b39a8032b1e9e202057e1b6db58 Mon Sep 17 00:00:00 2001 From: Henry Geay de Montenon Date: Wed, 20 Oct 2021 14:57:12 +0200 Subject: [PATCH] back to fixed versions --- files/local-storage-operator.yaml | 27 ++++++++++++++++++++++ files/ocs-operator.yaml | 29 ++++++++++++++++++++++++ tasks/main.yml | 4 ++-- templates/local-storage-operator.yaml.j2 | 2 +- templates/ocs-operator.yaml.j2 | 2 +- 5 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 files/local-storage-operator.yaml create mode 100644 files/ocs-operator.yaml diff --git a/files/local-storage-operator.yaml b/files/local-storage-operator.yaml new file mode 100644 index 0000000..807af9a --- /dev/null +++ b/files/local-storage-operator.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: openshift-local-storage +spec: {} +--- +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: openshift-local-storage + namespace: openshift-local-storage +spec: + targetNamespaces: + - openshift-local-storage +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: local-storage-operator + namespace: openshift-local-storage +spec: + channel: stable + installPlanApproval: Automatic + name: local-storage-operator + source: redhat-operators + sourceNamespace: openshift-marketplace diff --git a/files/ocs-operator.yaml b/files/ocs-operator.yaml new file mode 100644 index 0000000..18d07c0 --- /dev/null +++ b/files/ocs-operator.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: openshift-storage +spec: {} +--- +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: openshift-storage + namespace: openshift-storage +spec: + targetNamespaces: + - openshift-storage +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: ocs-operator + namespace: openshift-storage + labels: + operators.coreos.com/ocs-operator.openshift-storage: '' +spec: + channel: "stable-4.8" + installPlanApproval: Automatic + name: ocs-operator + source: redhat-operators + sourceNamespace: openshift-marketplace diff --git a/tasks/main.yml b/tasks/main.yml index 9fa24d6..d28af45 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -38,7 +38,7 @@ - name: Apply local-storage-operator configuration k8s: state: present - definition: "{{ lookup('template', 'local-storage-operator.yaml.j2') }}" + definition: "{{ lookup('file', 'local-storage-operator.yaml') }}" register: local_storage_success retries: 20 delay: 30 @@ -56,7 +56,7 @@ - name: Apply ocs-operator configuration k8s: state: present - definition: "{{ lookup('template', 'ocs-operator.yaml.j2') }}" + definition: "{{ lookup('file', 'ocs-operator.yaml') }}" register: ocs_operator_success retries: 20 delay: 30 diff --git a/templates/local-storage-operator.yaml.j2 b/templates/local-storage-operator.yaml.j2 index 541c4fe..807af9a 100644 --- a/templates/local-storage-operator.yaml.j2 +++ b/templates/local-storage-operator.yaml.j2 @@ -20,7 +20,7 @@ metadata: name: local-storage-operator namespace: openshift-local-storage spec: - channel: {{ ocp4_aio_subversion }} + channel: stable installPlanApproval: Automatic name: local-storage-operator source: redhat-operators diff --git a/templates/ocs-operator.yaml.j2 b/templates/ocs-operator.yaml.j2 index 860574b..18d07c0 100644 --- a/templates/ocs-operator.yaml.j2 +++ b/templates/ocs-operator.yaml.j2 @@ -22,7 +22,7 @@ metadata: labels: operators.coreos.com/ocs-operator.openshift-storage: '' spec: - channel: "stable-{{ ocp4_aio_subversion }}" + channel: "stable-4.8" installPlanApproval: Automatic name: ocs-operator source: redhat-operators