You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can format an Operator's version and channel information in the YAML format by running the following command:
120
+
121
+
[source,terminal]
122
+
----
123
+
$ oc get packagemanifests <operator_name> -n <catalog_namespace> -o yaml
124
+
----
125
+
====
126
+
127
+
. An Operator group, defined by an `OperatorGroup` object, selects target namespaces in which to generate required role-based access control (RBAC) access for all Operators in the same namespace as the Operator group.
128
+
+
129
+
The namespace to which you subscribe the Operator must have an Operator group that matches the install mode of the Operator, either the `AllNamespaces` or `SingleNamespace` mode. If the Operator you intend to install uses the `AllNamespaces` mode, then the `openshift-operators` namespace already has an appropriate Operator group in place.
130
+
+
131
+
However, if the Operator uses the `SingleNamespace` mode and you do not already have an appropriate Operator group in place, you must create one:
132
+
133
+
.. Create an `OperatorGroup` object YAML file, for example `operatorgroup.yaml`:
134
+
+
135
+
.Example `OperatorGroup` object
136
+
[source,yaml]
137
+
----
138
+
apiVersion: operators.coreos.com/v1
139
+
kind: OperatorGroup
140
+
metadata:
141
+
name: <operatorgroup_name>
142
+
namespace: <namespace>
143
+
spec:
144
+
targetNamespaces:
145
+
- <namespace>
146
+
----
147
+
148
+
.. Create the `OperatorGroup` object:
149
+
+
150
+
[source,terminal]
151
+
----
152
+
$ oc apply -f operatorgroup.yaml
153
+
----
154
+
33
155
. Create a `Subscription` object YAML file that subscribes a namespace to an Operator with a specific version by setting the `startingCSV` field. Set the `installPlanApproval` field to `Manual` to prevent the Operator from automatically upgrading if a later version exists in the catalog.
34
156
+
35
-
For example, the following `sub.yaml` file can be used to install the Red Hat Quay Operator specifically to version 3.4.0:
157
+
For example, the following `sub.yaml` file can be used to install the Red Hat Quay Operator specifically to version 3.7.10:
36
158
+
37
159
.Subscription with a specific starting Operator version
38
160
[source,yaml]
@@ -43,12 +165,12 @@ metadata:
43
165
name: quay-operator
44
166
namespace: quay
45
167
spec:
46
-
channel: quay-v3.4
168
+
channel: quay-operator.v3.7.10
47
169
installPlanApproval: Manual <1>
48
170
name: quay-operator
49
171
source: redhat-operators
50
172
sourceNamespace: openshift-marketplace
51
-
startingCSV: quay-operator.v3.4.0 <2>
173
+
startingCSV: quay-operator.v3.7.10 <2>
52
174
----
53
175
<1> Set the approval strategy to `Manual` in case your specified version is superseded by a later version in the catalog. This plan prevents an automatic upgrade to a later version and requires manual approval before the starting CSV can complete the installation.
* xref:../../operators/admin/olm-upgrading-operators.adoc#olm-approving-pending-upgrade_olm-upgrading-operators[Manually approving a pending Operator update]
40
+
* xref:../../operators/admin/olm-adding-operators-to-cluster.adoc#olm-installing-global-namespaces_olm-adding-operators-to-a-cluster[Installing global Operators in custom namespaces]
0 commit comments