Skip to content

Commit 6f7c121

Browse files
authored
Merge pull request #40180 from DebarghoGhosh/how-to-run-openshift-gitops-control-pane-3360
RHDEVDOCS-3360 - How to run OpenShift GitOps control plane on infra nodes
2 parents b478171 + 5f264c0 commit 6f7c121

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,8 @@ Topics:
14921492
File: configuring-sso-on-argo-cd-using-dex
14931493
- Name: Configuring SSO for Argo CD using Keycloak
14941494
File: configuring-sso-for-argo-cd-using-keycloak
1495+
- Name: Running Control Plane Workloads on Infra Nodes
1496+
File: run-gitops-control-plane-workload-on-infra-nodes
14951497
---
14961498
Name: Images
14971499
Dir: openshift_images
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include::modules/gitops-document-attributes.adoc[]
2+
[id="run-gitops-control-plane-workload-on-infra-nodes"]
3+
= Running GitOps control plane workloads on infrastructure nodes
4+
:context: run-gitops-control-plane-workload-on-infra-nodes
5+
include::modules/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
You can use infrastructure nodes to isolate infrastructure workloads for two primary purposes:
10+
11+
* Prevent incurring billing costs against subscription counts.
12+
* Separate maintenance and management.
13+
14+
include::modules/go-add-infra-nodes.adoc[leveloffset=+1]

modules/go-add-infra-nodes.adoc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Module included in the following assembly:
2+
//
3+
// * gitops/run-gitops-control-plane-workload-on-infra-node.adoc
4+
5+
[id="add-infra-nodes_{context}"]
6+
= Adding infrastructure nodes
7+
8+
.Procedure
9+
10+
. Label existing nodes as infrastructure by running the following command:
11+
+
12+
[source,terminal]
13+
----
14+
$ oc label node <node-name> node-role.kubernetes.io/infra
15+
----
16+
. Edit the `GitOpsService` Custom Resource (CR) to add the infrastructure node selector:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc edit gitopsservice -n openshift-gitops
21+
----
22+
. In the `GitOpsService` CR file, add `runOnInfra` toggle to the `spec` section and set it to `true`:
23+
+
24+
[source,yaml]
25+
----
26+
apiVersion: pipelines.openshift.io/v1alpha1
27+
kind: GitopsService
28+
metadata:
29+
name: cluster
30+
spec:
31+
runOnInfra: true
32+
----
33+
. Optional: Apply taints and isolate the workloads on infrastructure nodes and prevent other workloads from scheduling on these nodes.
34+
+
35+
[source,terminal]
36+
----
37+
$ oc adm taint nodes -l node-role.kubernetes.io/infra
38+
infra=reserved:NoSchedule infra=reserved:NoExecute
39+
----
40+
+
41+
. Optional: If you apply taints to the nodes, you can add tolerations in the `GitOpsService` CR:
42+
+
43+
[source,yaml]
44+
----
45+
spec:
46+
runOnInfra: true
47+
tolerations:
48+
- effect: NoSchedule
49+
key: infra
50+
value: reserved
51+
- effect: NoExecute
52+
key: infra
53+
value: reserved
54+
----
55+
56+
To verify that the workloads are scheduled on infrastructure nodes in the {gitops-title} namespace, click any of the pod names and ensure that the *Node selector* and *Tolerations* have been added.
57+
58+
[NOTE]
59+
====
60+
Any manually added *Node selectors* and *Tolerations* in the default Argo CD CR will be overwritten by the toggle and the tolerations in the `GitOpsService` CR.
61+
====

0 commit comments

Comments
 (0)