Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 25 additions & 72 deletions modules/nodes-cluster-resource-override-move-infra.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ endif::[]
= Moving the Cluster Resource Override Operator pods

[role="_abstract"]
To reduce the subscription requirements of your cluster, you can move the Cluster Resource Override Operator pods to infrastructure nodes. Move the pods by editing the `Subscription` custom resource (CR) for the Cluster Resource Override Operator and the `ClusterResourceOverride` CR.

By default, the Cluster Resource Override Operator installation process creates an Operator pod and two Cluster Resource Override pods on nodes in the `clusterresourceoverride-operator` namespace. You can move these pods to other nodes, such as infrastructure nodes, as needed.

ifdef::cro[]
Expand Down Expand Up @@ -44,43 +46,24 @@ ip-10-0-88-109.us-west-2.compute.internal Ready worker 24m
ip-10-0-67-453.us-west-2.compute.internal Ready infra 55m v1.35.4
----

.Prerequisites

* You created one or more infrastructure nodes with a node label such as `node-role.kubernetes.io/infra=""`.

.Procedure

. Move the Cluster Resource Override Operator pod by adding a node selector to the `Subscription` custom resource (CR) for the Cluster Resource Override Operator.
. Move the Cluster Resource Override Operator pod by adding a node selector to its `Subscription` CR:

.. Edit the CR:
.. Edit the CR by running the following command:
+
[source,terminal]
----
$ oc edit -n clusterresourceoverride-operator subscriptions.operators.coreos.com clusterresourceoverride
----

.. Add a node selector to match the node role label on the node where you want to install the Cluster Resource Override Operator pod:
+
[source,terminal]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: clusterresourceoverride
namespace: clusterresourceoverride-operator
# ...
spec:
config:
nodeSelector:
node-role.kubernetes.io/infra: ""
----
+
where:

`spec.config.nodeSelector`:: Specifies the role of the node where you want to deploy the Cluster Resource Override Operator pod.

.. Add a node selector to match the node role label on the node where you want to move the Cluster Resource Override Operator pod, and add a toleration if the node uses taints:
+
[NOTE]
====
If the infra node uses taints, you need to add a toleration to the `Subscription` CR. For example:

[source,terminal]
[source,yaml]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
Expand All @@ -96,26 +79,26 @@ spec:
- key: "node-role.kubernetes.io/infra"
operator: "Exists"
effect: "NoSchedule"
# ...
----

+
where:

`spec.config.tolerations`:: Specifies a toleration for a taint on the infra node.

====
+
`spec.config.nodeSelector`:: Specifies the role label on the node where you want to move the Cluster Resource Override Operator pod
`spec.config.tolerations`:: Specifies the toleration for the node where you want to move the pod. This field is only necessary if the node uses a taint.

. Move the Cluster Resource Override pods by adding a node selector to the `ClusterResourceOverride` custom resource (CR):

.. Edit the CR:
.. Edit the CR by running the following command:
+
[source,terminal]
----
$ oc edit ClusterResourceOverride cluster -n clusterresourceoverride-operator
----

.. Add a node selector to match the node role label on the infra node:
.. Add a node selector to match the node role label on the node, and add a toleration if the node uses taints:
+
[source,terminal]
[source,yaml]
----
apiVersion: operator.autoscaling.openshift.io/v1
kind: ClusterResourceOverride
Expand All @@ -132,59 +115,29 @@ spec:
replicas: 1
nodeSelector:
node-role.kubernetes.io/infra: ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I am sure this is correct, but this should get a QA ✔️

# ...
----
+
where:

`spec.deploymentOverrides.replicas`:: Specifies the number of Cluster Resource Override pods to deploy. The default is `2`. Only one pod is allowed per node. This parameter is optional.
`spec.deploymentOverrides.nodeSelector`:: Specifies the role of the node where you want to deploy the Cluster Resource Override pods. This parameter is optional.

+
[NOTE]
====
If the infra node uses taints, you need to add a toleration to the `ClusterResourceOverride` CR. For example:

[source,terminal]
----
apiVersion: operator.autoscaling.openshift.io/v1
kind: ClusterResourceOverride
metadata:
name: cluster
# ...
spec:
podResourceOverride:
spec:
memoryRequestToLimitPercent: 50
cpuRequestToLimitPercent: 25
limitCPUToMemoryPercent: 200
deploymentOverrides:
replicas: 3
nodeSelector:
node-role.kubernetes.io/worker: ""
tolerations:
- key: "key"
operator: "Equal"
value: "value"
effect: "NoSchedule"
# ...
----

+
where:

`spec.deploymentOverrides.tolerations`:: Specifies a toleration for a taint on the infra node.
====
+
`spec.deploymentOverrides.replicas`:: Optional: specifies the number of Cluster Resource Override pods to deploy. The default is `2`. Only one pod is allowed per node.
`spec.deploymentOverrides.nodeSelector`:: Specifies the role label on the node where you want to move the Cluster Resource Override Operator pod
`spec.deploymentOverrides.tolerations`:: Specifies the toleration for the node where you want to move the pod. This field is only necessary if the node uses a taint.

.Verification

* You can verify that the pods have moved by using the following command:
* You can verify that the pods have moved to the nodes with the label you specified by using the following command:
+
[source,terminal]
----
$ oc get pods -n clusterresourceoverride-operator -o wide
----

+
The Cluster Resource Override pods are now deployed to the infra nodes.
+
.Example output
[source,terminal]
Expand Down
Loading