Skip to content

Commit 699bbb0

Browse files
committed
Add OLM 1.0 arch/components
1 parent e1f5eb4 commit 699bbb0

34 files changed

+685
-379
lines changed

_attributes/common-attributes.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ endif::[]
187187
:osdk_ver: 1.31.0
188188
//Operator SDK version that shipped with the previous OCP 4.x release
189189
:osdk_ver_n1: 1.28.0
190+
//Next-gen (OCP 4.14+) Operator Lifecycle Manager, aka "v1"
191+
:olmv1: OLM 1.0
192+
:olmv1-first: Operator Lifecycle Manager (OLM) 1.0
190193
:ztp-first: GitOps Zero Touch Provisioning (ZTP)
191194
:ztp: GitOps ZTP
192195
:3no: three-node OpenShift

_topic_maps/_topic_map.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Topics:
214214
- Name: Installing a cluster on Azure into a government region
215215
File: installing-azure-government-region
216216
- Name: Installing a cluster on Azure in a restricted network with user-provisioned infrastructure
217-
File: installing-restricted-networks-azure-user-provisioned
217+
File: installing-restricted-networks-azure-user-provisioned
218218
- Name: Installing a cluster on Azure using ARM templates
219219
File: installing-azure-user-infra
220220
- Name: Installing a cluster on Azure in a restricted network
@@ -1855,18 +1855,29 @@ Topics:
18551855
Distros: openshift-origin
18561856
- Name: Cluster Operators reference
18571857
File: operator-reference
1858-
- Name: OLM v1 (Technology Preview)
1858+
- Name: OLM 1.0 (Technology Preview)
18591859
Dir: olm_v1
18601860
Distros: openshift-origin,openshift-enterprise
18611861
Topics:
1862-
- Name: About OLM v1
1862+
- Name: About OLM 1.0
18631863
File: index
1864-
- Name: Packaging format
1865-
File: olmv1-packaging-format
1866-
- Name: Managing catalogs
1867-
File: olmv1-managing-catalogs
1864+
- Name: Components and architecture
1865+
Dir: arch
1866+
Topics:
1867+
- Name: Components overview
1868+
File: olmv1-components
1869+
- Name: Operator Controller
1870+
File: olmv1-operator-controller
1871+
- Name: RukPak
1872+
File: olmv1-rukpak
1873+
- Name: Dependency resolution
1874+
File: olmv1-dependency
1875+
- Name: Catalogd
1876+
File: olmv1-catalogd
18681877
- Name: Installing an Operator from a catalog
18691878
File: olmv1-installing-an-operator-from-a-catalog
1879+
- Name: Managing plain bundles
1880+
File: olmv1-managing-plain-bundles
18701881
---
18711882
Name: CI/CD
18721883
Dir: cicd

modules/olm-rukpak-about.adoc

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Module included in the following assemblies:
22
//
33
// * operators/understanding/olm-packaging-format.adoc
4+
// * operators/olm_v1/olmv1_rukpak.adoc
45

56
:_content-type: CONCEPT
67
[id="olm-rukpak-about_{context}"]
@@ -11,13 +12,28 @@ ifeval::["{context}" == "olm-packaging-format"]
1112
include::snippets/technology-preview.adoc[]
1213

1314
{product-title} 4.12 introduces the _platform Operator_ type as a Technology Preview feature. The platform Operator mechanism relies on the RukPak component, also introduced in {product-title} 4.12, and its resources to manage content.
15+
16+
{product-title} 4.14 introduces {olmv1-first} as a Technology Preview feature, which also relies on the RukPak component.
1417
endif::[]
15-
ifeval::["{context}" == "olmv1-packaging-format"]
16-
= RukPak
18+
ifeval::["{context}" == "olmv1-rukpak"]
19+
= About RukPak
1720
endif::[]
1821

19-
RukPak consists of a series of controllers, known as _provisioners_, that install and manage content on a Kubernetes cluster. RukPak also provides two primary APIs: `Bundle` and `BundleDeployment`. These components work together to bring content onto the cluster and install it, generating resources within the cluster.
22+
RukPak is a pluggable solution for packaging and distributing cloud-native content. It supports advanced strategies for installation, updates, and policy.
23+
24+
RukPak provides a content ecosystem for installing a variety of artifacts on a Kubernetes cluster. Artifact examples include Git repositories, Helm charts, and OLM bundles. RukPak can then manage, scale, and upgrade these artifacts in a safe way to enable powerful cluster extensions.
25+
26+
At its core, RukPak is a small set of APIs and controllers. The APIs are packaged as custom resource definitions (CRDs) that express what content to install on a cluster and how to create a running deployment of the content. The controllers watch for the APIs.
2027

21-
A provisioner places a watch on both `Bundle` and `BundleDeployment` resources that refer to the provisioner explicitly. For a given bundle, the provisioner unpacks the contents of the `Bundle` resource onto the cluster. Then, given a `BundleDeployment` resource referring to that bundle, the provisioner installs the bundle contents and is responsible for managing the lifecycle of those resources.
28+
.Common terminology
2229

23-
Two provisioners are currently implemented and bundled with RukPak: the _plain provisioner_ that sources and unpacks `plain+v0` bundles, and the _registry provisioner_ that sources and unpacks Operator Lifecycle Manager (OLM) `registry+v1` bundles.
30+
Bundle::
31+
A collection of Kubernetes manifests that define content to be deployed to a cluster
32+
Bundle image::
33+
A container image that contains a bundle within its filesystem
34+
Bundle Git repository::
35+
A Git repository that contains a bundle within a directory
36+
Provisioner::
37+
Controllers that install and manage content on a Kubernetes cluster
38+
Bundle deployment::
39+
Generates deployed instances of a bundle

modules/olm-rukpak-plain-bundle.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ For example, the following shows the file tree in a `plain+v0` bundle. It must h
2020
.Example `plain+v0` bundle file tree
2121
[source,terminal]
2222
----
23+
$ tree manifests
24+
2325
manifests
2426
├── namespace.yaml
27+
├── service_account.yaml
2528
├── cluster_role.yaml
26-
├── role.yaml
27-
├── serviceaccount.yaml
2829
├── cluster_role_binding.yaml
29-
├── role_binding.yaml
3030
└── deployment.yaml
3131
----
3232

modules/olm-rukpak-provisioner.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
// Module included in the following assemblies:
22
//
33
// * operators/understanding/olm-packaging-format.adoc
4+
// * operators/olm_v1/olmv1_rukpak.adoc
45

56
:_content-type: CONCEPT
67
[id="olm-rukpak-provisioner_{context}"]
7-
= Provisioner
8+
= About provisioners
89

9-
A RukPak provisioner is a controller that understands the `BundleDeployment` and `Bundle` APIs and can take action. Each provisioner is assigned a unique ID and is responsible for reconciling `Bundle` and `BundleDeployment` objects with a `spec.provisionerClassName` field that matches that particular ID.
10+
RukPak consists of a series of controllers, known as _provisioners_, that install and manage content on a Kubernetes cluster. RukPak also provides two primary APIs: `Bundle` and `BundleDeployment`. These components work together to bring content onto the cluster and install it, generating resources within the cluster.
1011

11-
For example, the plain provisioner is able to unpack a given `plain+v0` bundle onto a cluster and then instantiate it, making the content of the bundle available in the cluster.
12+
Two provisioners are currently implemented and bundled with RukPak: the _plain provisioner_ that sources and unpacks `plain+v0` bundles, and the _registry provisioner_ that sources and unpacks Operator Lifecycle Manager (OLM) `registry+v1` bundles.
13+
14+
Each provisioner is assigned a unique ID and is responsible for reconciling `Bundle` and `BundleDeployment` objects with a `spec.provisionerClassName` field that matches that particular ID. For example, the plain provisioner is able to unpack a given `plain+v0` bundle onto a cluster and then instantiate it, making the content of the bundle available in the cluster.
15+
16+
A provisioner places a watch on both `Bundle` and `BundleDeployment` resources that refer to the provisioner explicitly. For a given bundle, the provisioner unpacks the contents of the `Bundle` resource onto the cluster. Then, given a `BundleDeployment` resource referring to that bundle, the provisioner installs the bundle contents and is responsible for managing the lifecycle of those resources.

modules/olmv1-about-catalogs.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// Module included in the following assemblies:
22
//
33
// * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc
4+
// * operators/olm_v1/arch/olmv1-catalogd.adoc
45

56
:_content-type: CONCEPT
67

78
[id="olmv1-about-catalogs_{context}"]
8-
= About catalogs in OLM 1.0
9+
= About catalogs in {olmv1}
910

10-
You can discover installable content by querying a catalog for Kubernetes extensions, such as Operators and controllers, by using the catalogd component. Catalogd is a Kubernetes extension that unpacks catalog content for on-cluster clients and is part of the OLM 1.0 suite of microservices. Currently, catalogd unpacks catalog content that is packaged and distributed as container images.
11+
You can discover installable content by querying a catalog for Kubernetes extensions, such as Operators and controllers, by using the catalogd component. Catalogd is a Kubernetes extension that unpacks catalog content for on-cluster clients and is part of the {olmv1-first} suite of microservices. Currently, catalogd unpacks catalog content that is packaged and distributed as container images.

modules/olmv1-about-purpose.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/olm_v1/index.adoc
4+
5+
:_content-type: CONCEPT
6+
7+
[id="olmv1-about-purpose_{context}"]
8+
= Purpose
9+
10+
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 and platform-as-a-service (PaaS) administrators throughout the lifecycle of the underlying cluster.
11+
12+
The initial version of OLM, which launched with {product-title} 4 and is included by default, focused on providing unique support for these specific needs for a particular type of cluster extension, known as Operators. Operators are classified as one or more Kubernetes controllers, shipping with one or more API extensions, as `CustomResourceDefinition` (CRD) objects, to provide additional functionality to the cluster.
13+
14+
After running in production clusters for many releases, the next-generation of OLM aims to encompass lifecycles for cluster extensions that are not just Operators.

modules/olmv1-about-target-versions.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Module included in the following assemblies:
22
//
33
// * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc
4+
// * operators/olm_v1/arch/olmv1-operator-controller.adoc
45

56
:_content-type: CONCEPT
67

78
[id="olmv1-about-operator-updates_{context}"]
8-
= About target versions in OLM 1.0
9+
= About target versions in {olmv1}
910

10-
In Operator Lifecycle Manager 1.0, cluster administrators set the target version of an Operator declaratively in the Operator's custom resource (CR).
11+
In {olmv1-first}, cluster administrators set the target version of an Operator declaratively in the Operator's custom resource (CR).
1112

12-
If you specify a channel in the Operator's CR, OLM 1.0 installs the latest release from the specified channel. When updates are published to the specified channel, OLM 1.0 automatically updates to the latest release from the channel.
13+
If you specify a channel in the Operator's CR, {olmv1} installs the latest release from the specified channel. When updates are published to the specified channel, {olmv1} automatically updates to the latest release from the channel.
1314

1415
.Example CR with a specified channel
1516
[source,yaml]
@@ -24,7 +25,7 @@ spec:
2425
----
2526
<1> Installs the latest release published to the specified channel. Updates to the channel are automatically installed.
2627

27-
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 1.0 does not change the target version when updates are published to the catalog.
28+
If you specify the Operator's target version in the CR, {olmv1} installs the specified version. When the target version is specified in the Operator's CR, {olmv1} does not change the target version when updates are published to the catalog.
2829

2930
If you want to update the version of the Operator that is installed on the cluster, you must manually update the Operator's CR. Specifying a Operator's target version pins the Operator's version to the specified release.
3031

@@ -45,7 +46,7 @@ If you want to change the installed version of an Operator, edit the Operator's
4546

4647
[WARNING]
4748
====
48-
In previous versions of OLM, Operator authors could define upgrade edges to prevent you from updating to unsupported versions. In its current state of development, OLM 1.0 does not enforce upgrade edge definitions. You can specify any version of an Operator, and OLM 1.0 attempts to apply the update.
49+
In previous versions of OLM, Operator authors could define upgrade edges to prevent you from updating to unsupported versions. In its current state of development, {olmv1} does not enforce upgrade edge definitions. You can specify any version of an Operator, and {olmv1} attempts to apply the update.
4950
====
5051

5152
You can inspect an Operator's catalog contents, including available versions and channels, by running the following command:
@@ -56,7 +57,7 @@ You can inspect an Operator's catalog contents, including available versions and
5657
$ oc get package <catalog_name>-<package_name> -o yaml
5758
----
5859

59-
After a you create or update a CR, create or configure the Operator by running the following command:
60+
After you create or update a CR, create or configure the Operator by running the following command:
6061

6162
.Command syntax
6263
[source,terminal]
@@ -70,7 +71,7 @@ $ oc apply -f <extension_name>.yaml
7071
+
7172
[source,terminal]
7273
----
73-
$ oc get operators.operators.operatorframework.io <operator_name> -o yaml
74+
$ oc get operator.operators.operatorframework.io <operator_name> -o yaml
7475
----
7576
+
7677
.Example output
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/olm_v1/olmv1-plain-bundles.adoc
4+
5+
:_content-type: PROCEDURE
6+
7+
[id="olmv1-adding-plain-bundle-to-fbc_{context}"]
8+
= Adding a plain bundle to a file-based catalog
9+
10+
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.
11+
12+
.Procedure
13+
14+
. Verify that the `index.json` or `index.yaml` file for your catalog is similar to the following example:
15+
+
16+
.Example `<catalog_dir>/index.json` file
17+
[source,json]
18+
----
19+
{
20+
{
21+
"schema": "olm.package",
22+
"name": "<extension_name>",
23+
"defaultChannel": ""
24+
}
25+
}
26+
----
27+
28+
. To create an `olm.bundle` blob, edit your `index.json` or `index.yaml` file, similar to the following example:
29+
+
30+
.Example `<catalog_dir>/index.json` file with `olm.bundle` blob
31+
[source,json]
32+
----
33+
{
34+
"schema": "olm.bundle",
35+
"name": "<extension_name>.v<version>",
36+
"package": "<extension_name>",
37+
"image": "quay.io/<organization_name>/<repository_name>:<image_tag>",
38+
"properties": [
39+
{
40+
"type": "olm.package",
41+
"value": {
42+
"packageName": "<extension_name>",
43+
"version": "<bundle_version>"
44+
}
45+
},
46+
{
47+
"type": "olm.bundle.mediatype",
48+
"value": "plain+v0"
49+
}
50+
]
51+
}
52+
----
53+
54+
. To create an `olm.channel` blob, edit your `index.json` or `index.yaml` file, similar to the following example:
55+
+
56+
.Example `<catalog_dir>/index.json` file with `olm.channel` blob
57+
[source,json]
58+
----
59+
{
60+
"schema": "olm.channel",
61+
"name": "<desired_channel_name>",
62+
"package": "<extension_name>",
63+
"entries": [
64+
{
65+
"name": "<extension_name>.v<version>"
66+
}
67+
]
68+
}
69+
----
70+
71+
// 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`.
72+
73+
.Verification
74+
75+
. Open your `index.json` or `index.yaml` file and ensure it is similar to the following example:
76+
+
77+
.Example `<catalog_dir>/index.json` file
78+
[source,json]
79+
----
80+
{
81+
"schema": "olm.package",
82+
"name": "example-extension",
83+
"defaultChannel": "preview"
84+
}
85+
{
86+
"schema": "olm.bundle",
87+
"name": "example-extension.v0.0.1",
88+
"package": "example-extension",
89+
"image": "quay.io/example-org/example-extension-bundle:v0.0.1",
90+
"properties": [
91+
{
92+
"type": "olm.package",
93+
"value": {
94+
"packageName": "example-extension",
95+
"version": "0.0.1"
96+
}
97+
},
98+
{
99+
"type": "olm.bundle.mediatype",
100+
"value": "plain+v0"
101+
}
102+
]
103+
}
104+
{
105+
"schema": "olm.channel",
106+
"name": "preview",
107+
"package": "example-extension",
108+
"entries": [
109+
{
110+
"name": "example-extension.v0.0.1"
111+
}
112+
]
113+
}
114+
----
115+
116+
. Validate your catalog by running the following command:
117+
+
118+
[source,terminal]
119+
----
120+
$ opm validate <catalog_dir>
121+
----
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/olm_v1/olmv1-plain-bundles.adoc
4+
5+
:_content-type: PROCEDURE
6+
7+
[id="olmv1-building-plain-bundle-image-source_{context}"]
8+
= Building a plain bundle image from an image source
9+
10+
The Operator Controller currently supports installing plain bundles created only from a _plain bundle image_.
11+
12+
.Procedure
13+
14+
. At the root of your project, create a Dockerfile that can build a bundle image:
15+
+
16+
.Example `plainbundle.Dockerfile`
17+
[source,docker]
18+
----
19+
FROM scratch <1>
20+
ADD manifests /manifests
21+
----
22+
<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.
23+
24+
. Build an Open Container Initiative (OCI)-compliant image by using your preferred build tool, similar to the following example:
25+
+
26+
[source,terminal]
27+
----
28+
$ podman build -f plainbundle.Dockerfile -t \
29+
quay.io/<organization_name>/<repository_name>:<image_tag> . <1>
30+
----
31+
<1> Use an image tag that references a repository where you have push access privileges.
32+
33+
. Push the image to your remote registry by running the following command:
34+
+
35+
[source,terminal]
36+
----
37+
$ podman push quay.io/<organization_name>/<repository_name>:<image_tag>
38+
----

0 commit comments

Comments
 (0)