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 Dec 1, 2023
1 parent 4ca4699 commit db64f7d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,42 @@
[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` specification in the `Subscription` object.

.Procedure

. Run the following command to patch the CSV:
. In the web console, navigate to *Operators* -> *Installed Operators*
. Click *Network Observability* and then select *Subscription*.
. From the *Actions* menu, click *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` specification and set the value to account account for your memory requirements. See the Additional resources for more information about resource considerations:
+
.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_latest_version> <2>
----

. 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`.
<2> This value should not be edited, but note that it changes depending on the most current release of the Operator.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ include::modules/troubleshooting-network-observability-network-flow.adoc[levelof

include::modules/troubleshooting-network-observability-controller-manager-pod-out-of-memory.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources
* xref:../network_observability/configuring-operator.adoc#network-observability-resources-table_network_observability[Resource considerations]
include::modules/troubleshooting-network-observability-loki-resource-exhausted.adoc[leveloffset=+1]

== Resource troubleshooting
Expand Down

0 comments on commit db64f7d

Please sign in to comment.