Skip to content

Commit 5f264c0

Browse files
committed
created document for the infra nodes
made review changes review changes made changes made review changes made review changes made review changes made review changes
1 parent 3d6a6f2 commit 5f264c0

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
@@ -1490,6 +1490,8 @@ Topics:
14901490
File: configuring-sso-on-argo-cd-using-dex
14911491
- Name: Configuring SSO for Argo CD using Keycloak
14921492
File: configuring-sso-for-argo-cd-using-keycloak
1493+
- Name: Running Control Plane Workloads on Infra Nodes
1494+
File: run-gitops-control-plane-workload-on-infra-nodes
14931495
---
14941496
Name: Images
14951497
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)