-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[4.14] OLM 1.0 add catalog & install Operator procedures #65847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc | ||
|
|
||
| :_content-type: CONCEPT | ||
|
|
||
| [id="olmv1-about-catalogs_{context}"] | ||
| = About catalogs in OLM 1.0 | ||
|
|
||
| Operator Lifecycle Manager (OLM) 1.0 introduces the catalogd component to the OLM suite of microservices. Catalogd is a Kubernetes extension that unpacks file-based catalog content for on-cluster clients. Currently, catalogd unpacks catalog content that is packaged and distributed as container images. | ||
|
|
||
| Catalogd helps customers discover installable content by hosting catalog metadata for Kubernetes extensions, such as Operators and controllers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc | ||
|
|
||
| :_content-type: CONCEPT | ||
|
|
||
| [id="olmv1-about-operator-updates_{context}"] | ||
| = About target versions in OLM 1.0 | ||
|
|
||
| In Operator Lifecycle Manager 1.0, cluster administrators the set target version of an Operator in the Operator's custom resource (CR). | ||
|
|
||
| If the Operator's version is not specified in the CR, then OLM 1.0 defaults to the latest stable version as the target version. When updates to the Operator are published to the catalog, the Operator automatically updates to the latest stable version. | ||
|
|
||
| .Example CR without a specified target version | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operators.operatorframework.io/v1alpha1 | ||
| kind: Operator | ||
| metadata: | ||
| name: quay-example | ||
| spec: | ||
| packageName: quay-operator | ||
| version: <1> | ||
| ---- | ||
| <1> Leave the target version unspecified to automatically set the version to the latest stable version. | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| What about a specified channel with an unspecified version? | ||
| ==== | ||
|
|
||
| If you specify the Operator's target version in the CR, OLM 1.0 installs the specified version. When the target version is specified in the Operator's CR, OLM does not update the target version. | ||
|
|
||
| .Example CR with the target version specified | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operators.operatorframework.io/v1alpha1 | ||
| kind: Operator | ||
| metadata: | ||
| name: quay-example | ||
| spec: | ||
| packageName: quay-operator | ||
| channel: stable-3.8 | ||
| version: 3.8.12 | ||
| ---- | ||
|
|
||
| Edit the target version to change the installed version of an Operator. As long as the update is supported by the skip ranges defined in the catalog, you can update across channels and even downgrade an Operator. | ||
|
|
||
| .Example CR with an updated target version | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operators.operatorframework.io/v1alpha1 | ||
| kind: Operator | ||
| metadata: | ||
| name: quay-example | ||
| spec: | ||
| packageName: quay-operator | ||
| channel: stable-3.9 | ||
| version: 3.9.1 | ||
| ---- | ||
|
|
||
| You can inspect an Operator's catalog contents, including supported versions and skip ranges, by running the following command: | ||
|
|
||
| .Command syntax | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get package <catalog_name>-<operator_name> -o yaml | ||
| ---- | ||
|
|
||
| After a CR is created or updated, run the following command to create or configure the Operator: | ||
|
|
||
| .Command syntax | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <extension_name>.yaml | ||
| ---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc | ||
|
|
||
| :_content-type: PRODCEDURE | ||
|
|
||
| [id="olmv1-adding-a-catalog-to-a-cluster_{context}"] | ||
| = Adding a catalog to a cluster | ||
|
|
||
| To add a catalog to a cluster, create a catalog custom resource (CR) and apply it to the cluster. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a catalog custom resource (CR), similar to the following example: | ||
| + | ||
| .Example `redhat-operators.yaml` | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: catalogd.operatorframework.io/v1alpha1 | ||
| kind: Catalog | ||
| metadata: | ||
| name: redhat-operators | ||
| spec: | ||
| source: | ||
| type: image | ||
| image: | ||
| ref: registry.redhat.io/redhat/redhat-operator-index:v{product-version} <1> | ||
| ---- | ||
| <1> Specify the catalog's image in the `spec.source.image` field. | ||
|
|
||
| . Run the following command to add the catalog to your cluster. By default, your catalog is installed in the `openshift-catalogd` namespace. | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f redhat-operators.yaml | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,text] | ||
| ---- | ||
| catalog.catalogd.operatorframework.io/redhat-operators created | ||
| ---- | ||
|
|
||
| .Verification | ||
|
|
||
| * Run the following commands to verify the status of your catalog: | ||
|
|
||
| .. Run the following command to check if your catalog is available: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get catalog | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,text] | ||
| ---- | ||
| NAME AGE | ||
| redhat-operators 20s | ||
| ---- | ||
|
|
||
| .. Run the following command to check the status of your catalog pods: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get pod -n openshift-catalogd | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,text] | ||
| ---- | ||
| NAME READY STATUS RESTARTS AGE | ||
| catalogd-controller-manager-5b8844bbc4-ps76j 2/2 Running 0 60m | ||
| redhat-operators 0/1 Completed 0 47s | ||
| ---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preview link: https://65847--docspreview.netlify.app/openshift-enterprise/latest/operators/olm_v1/olmv1-installing-an-operator-from-a-catalog