mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
Merge pull request #19238 from openshift-cherrypick-robot/cherry-pick-19209-to-enterprise-4.3
[enterprise-4.3] Use local CSV file for OSDK GS
This commit is contained in:
@@ -30,19 +30,13 @@ An Operator manifest describes how to display, create, and manage the
|
||||
application, in this case Memcached, as a whole. It is defined by a
|
||||
`ClusterServiceVersion` (CSV) object and is required for the OLM to function.
|
||||
+
|
||||
You can use the following command to generate CSV manifests:
|
||||
From the `memcached-operator/` directory that was created when you built the
|
||||
Memcached Operator, generate the CSV manifest:
|
||||
+
|
||||
----
|
||||
$ operator-sdk olm-catalog gen-csv --csv-version 0.0.1
|
||||
----
|
||||
+
|
||||
NOTE: This command is run from the `memcached-operator/` directory that was created when you built the Memcached Operator.
|
||||
+
|
||||
For the purpose of this guide, we will continue with this
|
||||
link:https://github.com/operator-framework/getting-started/blob/master/memcachedoperator.0.0.1.csv.yaml[predefined manifest file]
|
||||
for the next steps. You can alter the image field within this manifest to
|
||||
reflect the image you built in previous steps, but it is unnecessary.
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
See
|
||||
@@ -50,9 +44,7 @@ link:https://github.com/operator-framework/operator-lifecycle-manager/blob/maste
|
||||
for more information on manually defining a manifest file.
|
||||
====
|
||||
|
||||
. *Deploy the Operator.*
|
||||
|
||||
.. Create an OperatorGroup that specifies the namespaces that the Operator will
|
||||
. *Create an OperatorGroup* that specifies the namespaces that the Operator will
|
||||
target. Create the following OperatorGroup in the namespace where you will
|
||||
create the CSV. In this example, the `default` namespace is used:
|
||||
+
|
||||
@@ -68,12 +60,13 @@ spec:
|
||||
- default
|
||||
----
|
||||
|
||||
. *Deploy the Operator.* Use the files that were generated into the `deploy/`
|
||||
directory by the Operator SDK when you built the Memcached Operator.
|
||||
|
||||
.. Apply the Operator's CSV manifest to the specified namespace in the cluster:
|
||||
+
|
||||
----
|
||||
$ curl -Lo memcachedoperator.0.0.1.csv.yaml https://raw.githubusercontent.com/operator-framework/getting-started/master/memcachedoperator.0.0.1.csv.yaml
|
||||
$ oc apply -f memcachedoperator.0.0.1.csv.yaml
|
||||
$ oc get csv memcachedoperator.v0.0.1 -n default -o json | jq '.status'
|
||||
$ oc apply -f deploy/olm-catalog/memcached-operator/0.0.1/memcached-operator.v0.0.1.clusterserviceversion.yaml
|
||||
----
|
||||
+
|
||||
When you apply this manifest, the cluster does not immediately update because
|
||||
@@ -90,11 +83,6 @@ $ oc create -f deploy/role.yaml
|
||||
$ oc create -f deploy/role_binding.yaml
|
||||
----
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
These files were generated into the `deploy/` directory by the Operator SDK when you built the Memcached Operator.
|
||||
====
|
||||
+
|
||||
Because the OLM creates Operators in a particular namespace when a manifest is
|
||||
applied, administrators can leverage the native Kubernetes RBAC permission model
|
||||
to restrict which users are allowed to install Operators.
|
||||
|
||||
Reference in New Issue
Block a user