-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS#6673: Add initial OLM v1 subdir #63086
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Four |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,244 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * operators/olm_v1/olmv1-managing-catalogs.adoc | ||
|
|
||
| ifdef::openshift-origin[] | ||
| :registry-image: quay.io/operator-framework/opm:latest | ||
| endif::[] | ||
| ifndef::openshift-origin[] | ||
| :registry-image: registry.redhat.io/openshift4/ose-operator-registry:v{product-version} | ||
| endif::[] | ||
|
|
||
| :_content-type: PROCEDURE | ||
|
|
||
| [id="olmv1-building-plain-bundle-image-source_{context}"] | ||
| = Building a plain bundle image from an image source | ||
|
|
||
| The Operator Controller currently supports installing plain bundles created only from a _plain bundle image_. | ||
|
|
||
| .Prequisites | ||
|
|
||
| * You have Kubernetes manifests for your bundle in a flat directory at the root of your project similar to the following structure: | ||
| + | ||
| .Example directory structure | ||
| [source,terminal] | ||
| ---- | ||
| manifests | ||
| ├── namespace.yaml | ||
| ├── service_account.yaml | ||
| ├── cluster_role.yaml | ||
| ├── cluster_role_binding.yaml | ||
| └── deployment.yaml | ||
| ---- | ||
|
|
||
| .Procedure | ||
|
|
||
| . At the root of your project, create a Dockerfile that can build a bundle image: | ||
| + | ||
| .Example `plainbundle.Dockerfile` | ||
| [source,docker] | ||
|
adellape marked this conversation as resolved.
|
||
| ---- | ||
| FROM scratch <1> | ||
| ADD manifests /manifests | ||
| ---- | ||
| <1> Use the `FROM scratch` directive to make the size of the image smaller. No other files or directories are required in the bundle image. | ||
|
|
||
| . Build an OCI-compliant image using your preferred build tool, similar to the following example: | ||
|
adellape marked this conversation as resolved.
|
||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ podman build -f plainbundle.Dockerfile -t \ | ||
| quay.io/<organization_name>/<repository_name>:<image_tag> . <1> | ||
| ---- | ||
| <1> Use an image tag that references a repository where you have push access privileges. | ||
|
|
||
| . Push the image to your remote registry: | ||
|
adellape marked this conversation as resolved.
|
||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ podman push quay.io/<organization_name>/<repository_name>:<image_tag> | ||
| ---- | ||
|
|
||
| [id="olmv1-creating-fbc_{context}"] | ||
| = Creating a file-based catalog | ||
|
|
||
| If you do not have a file-based catalog, you must perform the following steps to initialize the catalog. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a directory for the catalog by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ mkdir <catalog_dir> | ||
| ---- | ||
|
|
||
| . Generate a Dockerfile that can build a catalog image by running the `opm generate dockerfile` command in the same directory level as the previous step: | ||
| + | ||
| [source,terminal,subs="attributes+"] | ||
| ---- | ||
| ifdef::openshift-origin[] | ||
| $ opm generate dockerfile <catalog_dir> | ||
| endif::[] | ||
| ifndef::openshift-origin[] | ||
| $ opm generate dockerfile <catalog_dir> \ | ||
| -i {registry-image} <1> | ||
| endif::[] | ||
| ---- | ||
| ifndef::openshift-origin[] | ||
| <1> Specify the official Red Hat base image by using the `-i` flag, otherwise the Dockerfile uses the default upstream image. | ||
| endif::[] | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| The generated Dockerfile must be in the same parent directory as the catalog directory that you created in the previous step: | ||
|
|
||
| .Example directory structure | ||
| [source,terminal] | ||
| ---- | ||
| . | ||
| ├── <catalog_dir> | ||
| └── <catalog_dir>.Dockerfile | ||
| ---- | ||
| ==== | ||
|
|
||
| . Populate the catalog with the package definition for your extension by running the `opm init` command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ opm init <extension_name> \ | ||
| --output json \ | ||
| > <catalog_dir>/index.json | ||
| ---- | ||
| + | ||
| This command generates an `olm.package` declarative config blob in the specified catalog configuration file. | ||
|
adellape marked this conversation as resolved.
|
||
|
|
||
| [id="olmv1-adding-plain-bundle-to-fbc_{context}"] | ||
| = Adding a plain bundle to a file-based catalog | ||
|
|
||
| Currently, the `opm render` command does not support adding plain bundles to catalogs. You must manually add plain bundles to your file-based catalog, as shown in the following procedure. | ||
|
adellape marked this conversation as resolved.
|
||
|
|
||
| .Procedure | ||
|
|
||
| . Verify that your catalog's `index.json` or `index.yaml` file is similar to the following example: | ||
|
adellape marked this conversation as resolved.
|
||
| + | ||
| .Example `<catalog_dir>/index.json` file | ||
| [source,json] | ||
| ---- | ||
| { | ||
| { | ||
| "schema": "olm.package", | ||
| "name": "<extension_name>", | ||
| "defaultChannel": "" | ||
| } | ||
|
adellape marked this conversation as resolved.
|
||
| } | ||
| ---- | ||
|
|
||
| . To create an `olm.bundle` blob, edit your `index.json` or `index.yaml` file, similar to the following example: | ||
| + | ||
| .Example `<catalog_dir>/index.json` file with `olm.bundle` blob | ||
| [source,json] | ||
| ---- | ||
| { | ||
| "schema": "olm.bundle", | ||
| "name": "<extension_name>.v<version>", | ||
| "package": "<extension_name>", | ||
| "image": "quay.io/<organization_name>/<repository_name>:<image_tag>", | ||
| "properties": [ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's better to add the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jianzhangbjz why do we have to add those types? My assumption was that for plain bundle, they're not really required. |
||
| { | ||
| "type": "olm.package", | ||
| "value": { | ||
| "packageName": "<extension_name>", | ||
| "version": "<bundle_version>" | ||
| } | ||
| }, | ||
| { | ||
| "type": "olm.bundle.mediatype", | ||
| "value": "plain+v0" | ||
| } | ||
| ] | ||
| } | ||
| ---- | ||
|
|
||
| . To create an `olm.channel` blob, edit your `index.json` or `index.yaml` file, similar to the following example: | ||
| + | ||
| .Example `<catalog_dir>/index.json` file with `olm.channel` blob | ||
| [source,json] | ||
| ---- | ||
| { | ||
| "schema": "olm.channel", | ||
| "name": "<desired_channel_name>", | ||
| "package": "<extension_name>", | ||
| "entries": [ | ||
| { | ||
| "name": "<extension_name>.v<version>" | ||
| } | ||
| ] | ||
| } | ||
| ---- | ||
|
|
||
| // Please refer to [channel naming conventions](https://olm.operatorframework.io/docs/best-practices/channel-naming/) for choosing the <desired_channel_name>. An example of the <desired_channel_name> is `candidate-v0`. | ||
|
|
||
| .Verification | ||
|
|
||
| * Open your `index.json` or `index.yaml` file and ensure it is similar to the following example: | ||
| + | ||
| .Example `<catalog_dir>/index.json` file | ||
| [source,json] | ||
| ---- | ||
| { | ||
| "schema": "olm.package", | ||
| "name": "example-extension", | ||
| } | ||
| { | ||
| "schema": "olm.bundle", | ||
| "name": "example-extension.v0.0.1", | ||
| "package": "example-extension", | ||
| "image": "quay.io/rashmigottipati/example-extension-bundle:v0.0.1", | ||
| "properties": [ | ||
| { | ||
| "type": "olm.package", | ||
| "value": { | ||
| "packageName": "example-extension", | ||
| "version": "v0.0.1" | ||
| } | ||
| }, | ||
| { | ||
| "type": "olm.bundle.mediatype", | ||
| "value": "plain+v0" | ||
| } | ||
| ] | ||
| } | ||
| { | ||
| "schema": "olm.channel", | ||
| "name": "preview", | ||
| "package": "example-extension", | ||
| "entries": [ | ||
| { | ||
| "name": "example-extension.v0.0.1" | ||
| } | ||
| ] | ||
| } | ||
| ---- | ||
|
|
||
| [id="olmv1-publishing-fbc_{context}"] | ||
| = Building and publishing a file-based catalog | ||
|
|
||
| .Procedure | ||
|
|
||
| . Build your file-bsaed catalog as an image by running the following command: | ||
|
adellape marked this conversation as resolved.
|
||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ podman build -f <catalog_dir>.Dockerfile -t \ | ||
| quay.io/<organization_name>/<repository_name>:<image_tag> . | ||
| ---- | ||
|
|
||
| . Push your catalog image by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ podman push quay.io/<organization_name>/<repository_name>:<image_tag> | ||
| ---- | ||
|
|
||
| :!registry-image: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../_attributes/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../images/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| :_content-type: ASSEMBLY | ||
| [id="olmv1-about"] | ||
| = About Operator Lifecycle Manager v1 (Technology Preview) | ||
| include::_attributes/common-attributes.adoc[] | ||
| :context: olmv1-about | ||
|
|
||
| toc::[] | ||
|
|
||
| {product-title} 4.14 introduces components for a next-generation iteration of Operator Lifecycle Manager (OLM) as a Technology Preview feature. Known during this phase as OLM v1, the updated framework evolves many of the concepts that have been part of the version of OLM included since the release of {product-title} 4. | ||
|
adellape marked this conversation as resolved.
|
||
|
|
||
| :FeatureName: OLM v1 | ||
| include::snippets/technology-preview.adoc[] | ||
|
|
||
| During this Technology Preview phase of OLM v1 in {product-title} 4.14, administrators can use file-based catalogs to install and manage the following: | ||
|
|
||
| * OLM-based Operators, similar to the existing OLM experience | ||
| * Plain bundles, which are static collections of arbitrary Kubernetes manifests | ||
|
|
||
| [id="olmv1-about-purpose"] | ||
| == Purpose | ||
|
|
||
| The mission of Operator Lifecycle Manager (OLM) has been to manage the lifecycle of cluster extensions centrally and declaratively on Kubernetes clusters. Its purpose has always been to make installing, running, and updating functional extensions to the cluster easy, safe, and reproducible for cluster administrators and platform-as-a-service (PaaS) administrators, throughout the lifecycle of the underlying cluster. | ||
|
adellape marked this conversation as resolved.
|
||
|
|
||
| The existing version of OLM, which launched with {product-title} 4 and is included by default, was focused on providing unique support for these specific needs for a particular type of cluster extension, which have been referred as Operators. Operators are classified as one or more Kubernetes controllers, shipping with one or more API extensions (`CustomResourceDefinition` objects) to provide additional functionality to the cluster. | ||
|
|
||
| After running OLM in production clusters for many releases, it became apparent that there is a desire to deviate from this coupling of CRDs and controllers to encompass the lifecycling of extensions that are not just Operators. | ||
|
adellape marked this conversation as resolved.
|
||
|
|
||
| Some of the goals of OLM v1 over the upcoming releases include improving Operator and extension lifecycle management in the following areas: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [re: avoiding future claims] Checking with PM on how/if we want to make any statements like this. Included it here to try to give a brief sense that this release is just a first step of what ultimately will feed into OLM v1's bigger picture when it's more fully-realized.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming you get approval on the specifics of the plan/claim, the language seems fine to me. |
||
|
|
||
| * Tenant isolation | ||
| * Dependencies and constraints | ||
| * Simplified packaging models | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../modules/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| :_content-type: ASSEMBLY | ||
| [id="olmv1-managing-catalogs"] | ||
| = Managing catalogs for OLM v1 (Technology Preview) | ||
| include::_attributes/common-attributes.adoc[] | ||
| :context: olmv1-managing-catalogs | ||
|
|
||
| toc::[] | ||
|
|
||
| In OLM v1, a _plain bundle_ is a static collection of arbitrary Kubernetes manifests in YAML format. The experimental `olm.bundle.mediatype` property of the `olm.bundle` schema object differentiates a plain bundle (`plain+v0`) from a regular (`registry+v1`) bundle. | ||
|
|
||
| :FeatureName: OLM v1 | ||
| include::snippets/technology-preview.adoc[] | ||
|
|
||
| // For more information, see the [Plain Bundle Specification](https://github.com/operator-framework/rukpak/blob/main/docs/bundles/plain.md) in the RukPak repository. | ||
|
|
||
| As a cluster administrator, you can build and publish a file-based catalog that includes a plain bundle image by completing the following procedures: | ||
|
|
||
| . Build a plain bundle image. | ||
| . Create a file-based catalog. | ||
| . Add the plain bundle image to your file-based catalog. | ||
| . Build your catalog as an image. | ||
| . Publish your catalog image. | ||
|
|
||
| [role="_additional-resources"] | ||
| .Additional resources | ||
|
|
||
| * xref:../../operators/olm_v1/olmv1-packaging-format.adoc#olmv1-packaging-format[RukPak component and packaging format] | ||
|
|
||
| [id="prerequisites_olmv1-plain-bundles"] | ||
| == Prerequisites | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A little confusing, since there are also prereqs (as |
||
|
|
||
| - Access to an {product-title} cluster using an account with `cluster-admin` permissions | ||
| - The `TechPreviewNoUpgrades` feature set enabled on the cluster | ||
| + | ||
| [WARNING] | ||
| ==== | ||
| Enabling the `TechPreviewNoUpgrade` feature set cannot be undone and prevents minor version updates. These feature sets are not recommended on production clusters. | ||
| ==== | ||
| - The `oc` command installed on your workstation | ||
| - `opm` CLI tool | ||
|
adellape marked this conversation as resolved.
|
||
| - Docker or Podman | ||
| - Push access to a container registry, such as link:https://quay.io[Quay] | ||
|
|
||
| [role="_additional-resources"] | ||
| .Additional resources | ||
|
|
||
| * xref:../../nodes/clusters/nodes-cluster-enabling-features.adoc#nodes-cluster-enabling[Enabling features using feature gates] | ||
|
|
||
| // - Only the `redhat-operators` catalog source enabled on the cluster. This is a restriction during the Technology Preview release. | ||
|
|
||
| include::modules/olmv1-catalog-plain.adoc[leveloffset=+1] | ||
Uh oh!
There was an error while loading. Please reload this page.