Skip to content

Commit

Permalink
OSDOCS-8330: Configure limits via Subscription, not CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
skrthomas committed Nov 29, 2023
1 parent 4ca4699 commit b829ee4
Showing 1 changed file with 27 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,40 @@
[id="controller-manager-pod-runs-out-of-memory_{context}"]
= Network Observability controller manager pod runs out of memory

You can increase memory limits for the Network Observability operator by patching the Cluster Service Version (CSV), where Network Observability controller manager pod runs out of memory.
You can increase memory limits for the Network Observability operator by editing the `spec.config.resources.limits.memory` configuration in the `Subscription` object.

.Procedure

. Run the following command to patch the CSV:
. In the web console, navigate to *Operators* -> *Installed Operators*
. In *Network Observability* click the *Subscription* menu and choose *Edit Subscription*.
.. Alternatively, you can use the CLI to open the YAML configuration for the `Subscription` object by running the following command:
+
[source,terminal]
----
$ oc -n netobserv patch csv network-observability-operator.v1.0.0 --type='json' -p='[{"op": "replace", "path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/resources/limits/memory", value: "1Gi"}]'
$ oc edit subscription netobserv-operator -n openshift-netobserv-operator
----
. Edit the `Subscription` object to add the `config.resources.limits.memory` and set the memory to account for your needs:
+
.Example output
[source,yaml]
----
clusterserviceversion.operators.coreos.com/network-observability-operator.v1.0.0 patched
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: netobserv-operator
namespace: openshift-netobserv-operator
spec:
channel: stable
config:
resources:
limits:
memory: 800Mi <1>
requests:
cpu: 100m
memory: 100Mi
installPlanApproval: Automatic
name: netobserv-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: network-observability-operator.v1.4.1
----

. Run the following command to view the updated CSV:
+
[source,terminal]
----
$ oc -n netobserv get csv network-observability-operator.v1.0.0 -o jsonpath='{.spec.install.spec.deployments[0].spec.template.spec.containers[0].resources.limits.memory}'
1Gi
----
<1> For example, you can increase the memory limit to `800Mi`.

0 comments on commit b829ee4

Please sign in to comment.