Skip to content

Commit 3d71c45

Browse files
authored
Merge pull request #29567 from adellape/startingcsv
Add module for startingCSV usage
2 parents a8c6b82 + f235b73 commit 3d71c45

File tree

6 files changed

+89
-10
lines changed

6 files changed

+89
-10
lines changed

modules/olm-installing-operators-from-operatorhub.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ ifeval::["{context}" == "olm-installing-operators-in-namespace"]
1212
endif::[]
1313

1414
[id="olm-installing-operators-from-operatorhub_{context}"]
15-
= Installing Operators from OperatorHub
15+
= Operator installation with OperatorHub
16+
17+
OperatorHub is a user interface for discovering Operators; it works in conjunction with Operator Lifecycle Manager (OLM), which installs and manages Operators on a cluster.
1618

1719
ifndef::olm-user[]
1820
As a cluster administrator, you can install an Operator from OperatorHub using the {product-title}
1921
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
20-
web console or CLI. You can then subscribe the Operator to one or more namespaces to make it available for developers on your cluster.
22+
web console or CLI. Subscribing an Operator to one or more namespaces makes the Operator available to developers on your cluster.
2123
endif::[]
2224
ifdef::openshift-dedicated[]
2325
web console. You can then subscribe the Operator to the default `openshift-operators` namespace to make it available for developers on your cluster. When you subscribe the Operator to all namespaces, the Operator is installed in the `openshift-operators` namespace; this installation method is not supported by all Operators.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/user/olm-installing-operators-in-namespace.adoc
4+
// * operators/admin/olm-adding-operators-to-cluster.adoc
5+
6+
ifeval::["{context}" == "olm-installing-operators-in-namespace"]
7+
:olm-user:
8+
endif::[]
9+
10+
[id="olm-installing-specific-version-cli_{context}"]
11+
= Installing a specific version of an Operator
12+
13+
You can install a specific version of an Operator by setting the cluster service version (CSV) in a `Subscription` object.
14+
15+
.Prerequisites
16+
17+
ifndef::olm-user[]
18+
- Access to an {product-title} cluster using an account with
19+
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
20+
`cluster-admin` permissions
21+
endif::[]
22+
ifdef::openshift-dedicated[]
23+
`dedicated-admins-cluster` permissions
24+
endif::[]
25+
endif::[]
26+
27+
ifdef::olm-user[]
28+
- Access to an {product-title} cluster using an account with Operator installation permissions
29+
endif::[]
30+
31+
- OpenShift CLI (`oc`) installed
32+
33+
.Procedure
34+
35+
. 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.
36+
+
37+
For example, the following `sub.yaml` file can be used to install the Red Hat Quay Operator specifically to version 3.4.0:
38+
+
39+
.Subscription with a specific starting Operator version
40+
[source,yaml]
41+
----
42+
apiVersion: operators.coreos.com/v1alpha1
43+
kind: Subscription
44+
metadata:
45+
name: quay-operator
46+
namespace: quay
47+
spec:
48+
channel: quay-v3.4
49+
installPlanApproval: Manual <1>
50+
name: quay-operator
51+
source: redhat-operators
52+
sourceNamespace: openshift-marketplace
53+
startingCSV: quay-operator.v3.4.0 <2>
54+
----
55+
<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.
56+
<2> Set a specific version of an Operator CSV.
57+
58+
. Create the `Subscription` object:
59+
+
60+
[source,terminal]
61+
----
62+
$ oc apply -f sub.yaml
63+
----
64+
65+
. Manually approve the pending install plan to complete the Operator installation.

modules/olm-operatorhub-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[id="olm-operatorhub-overview_{context}"]
66
= About OperatorHub
77

8-
_OperatorHub_ is the web console interface in {product-title} that cluster administrators use to discover and install Operators. With one click, an Operator can be pulled from its off-cluster source, installed and subscribed on the cluster, and made ready for engineering teams to self-service manage the product across deployment environments using the Operator Lifecycle Manager (OLM).
8+
_OperatorHub_ is the web console interface in {product-title} that cluster administrators use to discover and install Operators. With one click, an Operator can be pulled from its off-cluster source, installed and subscribed on the cluster, and made ready for engineering teams to self-service manage the product across deployment environments using Operator Lifecycle Manager (OLM).
99

1010
ifndef::openshift-origin[]
1111
Cluster administrators can choose from catalogs grouped into the following categories:

operators/admin/olm-adding-operators-to-cluster.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include::modules/common-attributes.adoc[]
88

99
toc::[]
1010

11-
This guide walks cluster administrators through installing Operators to an {product-title} cluster and subscribing Operators to namespaces.
11+
Cluster administrators can install Operators to an {product-title} cluster by subscribing Operators to namespaces with OperatorHub.
1212

1313
ifdef::openshift-origin[]
1414
[id="olm-adding-operators-to-a-cluster-prereqs"]
@@ -20,10 +20,17 @@ If you have the pull secret, add the `redhat-operators` catalog to the `Operator
2020
endif::[]
2121

2222
include::modules/olm-installing-operators-from-operatorhub.adoc[leveloffset=+1]
23-
include::modules/olm-installing-from-operatorhub-using-web-console.adoc[leveloffset=+2]
23+
* xref:../../operators/understanding/olm-understanding-operatorhub.adoc#olm-understanding-operatorhub[Understanding OperatorHub]
24+
25+
include::modules/olm-installing-from-operatorhub-using-web-console.adoc[leveloffset=+1]
2426
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
25-
include::modules/olm-installing-from-operatorhub-using-cli.adoc[leveloffset=+2]
27+
include::modules/olm-installing-from-operatorhub-using-cli.adoc[leveloffset=+1]
2628
.Additional resources
2729

2830
* xref:../../operators/understanding/olm/olm-understanding-operatorgroups.adoc#olm-operatorgroups-about_olm-understanding-operatorgroups[About Operator groups]
31+
32+
include::modules/olm-installing-specific-version-cli.adoc[leveloffset=+1]
33+
.Additional resources
34+
35+
* xref:../../operators/admin/olm-upgrading-operators.adoc#olm-approving-pending-upgrade_olm-upgrading-operators[Manually approving a pending Operator upgrade]
2936
endif::[]

operators/understanding/olm-understanding-operatorhub.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ include::modules/common-attributes.adoc[]
55

66
toc::[]
77

8-
This guide outlines the architecture of OperatorHub.
9-
108
include::modules/olm-operatorhub-overview.adoc[leveloffset=+1]
119
include::modules/olm-operatorhub-architecture.adoc[leveloffset=+1]
1210

operators/user/olm-installing-operators-in-namespace.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ If you have the pull secret, add the `redhat-operators` catalog to the `Operator
1919
endif::[]
2020

2121
include::modules/olm-installing-operators-from-operatorhub.adoc[leveloffset=+1]
22-
include::modules/olm-installing-from-operatorhub-using-web-console.adoc[leveloffset=+2]
22+
* xref:../../operators/understanding/olm-understanding-operatorhub.adoc#olm-understanding-operatorhub[Understanding OperatorHub]
23+
24+
include::modules/olm-installing-from-operatorhub-using-web-console.adoc[leveloffset=+1]
2325
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
24-
include::modules/olm-installing-from-operatorhub-using-cli.adoc[leveloffset=+2]
26+
include::modules/olm-installing-from-operatorhub-using-cli.adoc[leveloffset=+1]
2527
.Additional resources
2628

2729
* xref:../../operators/understanding/olm/olm-understanding-operatorgroups.adoc#olm-operatorgroups-about_olm-understanding-operatorgroups[About Operator groups]
30+
31+
include::modules/olm-installing-specific-version-cli.adoc[leveloffset=+1]
32+
.Additional resources
33+
34+
* xref:../../operators/admin/olm-upgrading-operators.adoc#olm-approving-pending-upgrade_olm-upgrading-operators[Manually approving a pending Operator upgrade]
2835
endif::[]

0 commit comments

Comments
 (0)