Skip to content
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

OSDOCS-8330: Configure limits via Subscription, not CSV #68486

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
skrthomas marked this conversation as resolved.
Show resolved Hide resolved

. Run the following command to patch the CSV:
. In the web console, navigate to *Operators* -> *Installed Operators*
skrthomas marked this conversation as resolved.
Show resolved Hide resolved
. 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 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:
skrthomas marked this conversation as resolved.
Show resolved Hide resolved
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