Skip to content

Commit 31dae29

Browse files
committed
Add OLMConfig / disabling copied CSVs
1 parent 17a42a2 commit 31dae29

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,9 @@ Topics:
13241324
- Name: Deleting Operators from a cluster
13251325
File: olm-deleting-operators-from-cluster
13261326
Distros: openshift-enterprise,openshift-origin
1327+
- Name: Configuring OLM features
1328+
File: olm-config
1329+
Distros: openshift-enterprise,openshift-origin
13271330
- Name: Configuring proxy support
13281331
File: olm-configuring-proxy-support
13291332
Distros: openshift-enterprise,openshift-origin
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/admin/olm-config.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="olm-disabling-copied-csvs_{context}"]
7+
= Disabling copied CSVs
8+
9+
When an Operator is installed by Operator Lifecycle Manager (OLM), a simplified copy of its cluster service version (CSV) is created in every namespace that the Operator is configured to watch. These CSVs are known as _copied CSVs_ and communicate to users which controllers are actively reconciling resource events in a given namespace.
10+
11+
When Operators are configured to use the `AllNamespaces` install mode, versus targeting a single or specified set of namespaces, a copied CSV is created in every namespace on the cluster. On especially large clusters, with namespaces and installed Operators potentially in the hundreds or thousands, copied CSVs consume an untenable amount of resources, such as OLM's memory usage, cluster etcd limits, and networking.
12+
13+
To support these larger clusters, cluster administrators can disable copied CSVs for Operators installed with the `AllNamespaces` mode.
14+
15+
.Procedure
16+
17+
* Edit the `OLMConfig` object named `cluster` and set the `spec.features.disableCopiedCSVs` field to `true`:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc apply -f - <<EOF
22+
apiVersion: operators.coreos.com/v1
23+
kind: OLMConfig
24+
metadata:
25+
name: cluster
26+
spec:
27+
features:
28+
disableCopiedCSVs: true <1>
29+
EOF
30+
----
31+
<1> Disabled copied CSVs for `AllNamespaces` install mode Operators
32+
33+
.Verification
34+
35+
* When copied CSVs are disabled, OLM captures this information in an event in the Operator's namespace:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc get events
40+
----
41+
+
42+
.Example output
43+
[source,terminal]
44+
----
45+
LAST SEEN TYPE REASON OBJECT MESSAGE
46+
85s Warning DisabledCopiedCSVs clusterserviceversion/my-csv.v1.0.0 CSV copying disabled for operators/my-csv.v1.0.0
47+
----
48+
+
49+
When the `spec.features.disableCopiedCSVs` field is missing or set to `false`, OLM recreates the copied CSVs for all Operators installed with the `AllNamespaces` mode and deletes the previously mentioned events.

operators/admin/olm-config.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
:_content-type: ASSEMBLY
2+
[id="olm-config"]
3+
= Configuring Operator Lifecycle Manager features
4+
include::modules/common-attributes.adoc[]
5+
:context: olm-config
6+
7+
toc::[]
8+
9+
The Operator Lifecycle Manager (OLM) controller is configured by an `OLMConfig` custom resource (CR) named `cluster`. Cluster administrators can modify this resource to enable or disable certain features.
10+
11+
This document outlines the features currently supported by OLM that are configured by the `OLMConfig` resource.
12+
13+
include::modules/olm-disabling-copied-csvs.adoc[leveloffset=+1]
14+
.Additional resources
15+
16+
* xref:../../operators/understanding/olm/olm-understanding-operatorgroups.adoc#olm-operatorgroups-membership_olm-understanding-operatorgroups[Install modes]

0 commit comments

Comments
 (0)