You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/continuous-delivery/gitops/get-started/harness-git-ops-basics.md
+90-32Lines changed: 90 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,59 +106,117 @@ While the GitOps Agent runs in your environment, all other GitOps functionalitie
106
106
107
107
### Harness GitOps Agent
108
108
109
-
A Harness GitOps Agent is a worker process that runs in your environment, makes secure, outbound connections to Harness SaaS, and performs all the GitOps tasks you request in Harness.
109
+
A Harness GitOps Agent is a lightweight worker process that runs in your Kubernetes environment and serves as the bridge between Harness SaaS and your clusters. The Agent makes secure, outbound connections to Harness SaaS and performs all GitOps operations you configure in the Harness platform.
110
+
111
+
**Key responsibilities:**
112
+
113
+
- Connects to your Git repositories to fetch desired state configurations
114
+
- Monitors Git for changes and triggers synchronization when updates are detected
115
+
- Applies manifests to target Kubernetes clusters to reconcile desired and live states
116
+
- Reports deployment status and health back to Harness SaaS
117
+
118
+
The Agent uses Repository and Cluster configurations to connect to source repos and target environments. When you create a Harness GitOps Application, you select the Agent you want to use for these connections and GitOps operations.
110
119
111
120
Here's an image that illustrates how the Agent interacts with Harness:
112
121
113
122

114
123
115
-
The Agent uses the Repository and Cluster to connect to source repos and target environments. When you create a Harness GitOps Application, you select the Agent you want to use for these connections and GitOps operations.
124
+
####Agent deployment patterns
116
125
117
-
#### Ways to Use the GitOps Agent
126
+
You can deploy a GitOps Agent in different configurations depending on your infrastructure and requirements. The Agent can run in your target cluster or in a separate cluster that has network access to your target clusters.
118
127
119
-
You can run an Agent in your target cluster or in any cluster that has access to your target clusters.
128
+
Here's an image that illustrates different deployment patterns:
120
129
121
-
Agents can deploy to all clusters or you can isolate an Agent in a single cluster. For example, you might have one Agent deploy to Dev and QA environments and another Agent deploy to the production environment.
130
+

122
131
123
-
Here's an image that illustrates a Kubernetes deployment on the same cluster as the Agent, a deployment on different clusters, and deployments on two different clusters using one Agent:
132
+
**Quick comparison:**
124
133
125
-

134
+
| Pattern | Clusters | Agents | Best For | Tradeoffs |
- Additional overhead for managing cross-cluster connectivity
174
+
175
+
**Scenario 3: Hub and spoke (multi-cluster, single agent)**
176
+
177
+
One Agent manages multiple target clusters from a central location.
178
+
179
+
**When to use:** Organizations managing multiple clusters with centralized operations, or when you need consistent deployments across environments.
180
+
181
+
**Advantages:**
182
+
- Centralized management of multiple clusters
183
+
- Single agent to maintain
184
+
- Consistent deployment patterns across clusters
126
185
127
-
There are pros and cons to each of these scenarios:
128
-
1.**Scenario 1: Single Cluster, Single Agent, In-Cluster Deployment of Resources**
186
+
**Limitations:**
187
+
- Single point of failure affects all managed clusters
188
+
- Performance may degrade as clusters and applications scale
189
+
- May require transitioning to multiple agents as you grow
129
190
130
-
**Pros:**
131
-
* **Simplicity:** This pattern is straightforward to set up and maintain as it involves a single GitOps Agent and Argo CD instance managing deployments within a single cluster.
132
-
* **Resource Efficiency:** With a single instance, resource usage is optimized as there is no need for additional instances or coordination between clusters.
191
+
**Scenario 4: Multi-cluster with multiple agents**
133
192
134
-
**Cons:**
135
-
* **Limited Scalability:** Scaling beyond a single cluster can be challenging as the Argo CD instance is tightly coupled to the specific cluster it is managing.
136
-
* **Single Point of Failure:** If the Argo CD instance fails, all deployments within that cluster may be affected.
193
+
Multiple Agents, each managing one or more clusters independently.
137
194
138
-
1.**Scenario 2: Single Target Cluster for Deployment, Single Agent outside of Target Cluster**
195
+
**When to use:** Enterprise environments requiring high availability, team isolation, or when managing many clusters at scale.
139
196
140
-
**Pros:**
141
-
* **Simplicity:** A single GitOps Agent to manage as well as a single target cluster.
142
-
* **Better Isolation** as compared to in-cluster set-up in Scenario 1.
197
+
**Advantages:**
198
+
- High scalability and fault tolerance
199
+
- Team isolation and independent operations
200
+
- Failure of one agent doesn't affect others
143
201
144
-
**Cons:**
145
-
* **Increased Management Overhead:** Configuration overhead like IP allow listing, permission for external cluster to connect and so on.
202
+
**Limitations:**
203
+
- Higher resource utilization
204
+
- More complex management and coordination
205
+
- Requires planning for agent distribution and cluster assignment
146
206
147
-
1.**Scenario 3: Multi-Cluster, Single Argo CD Instance - hub and spoke**
207
+
#### Installing a GitOps Agent
148
208
149
-
**Pros:**
150
-
* **Centralized Management:** A single GitOps Agent coupled with an Argo CD instance can manage multiple Kubernetes clusters, enabling centralized deployment management.
151
-
* **Simplicity:** A single GitOps Agent to manage applications across multiple clusters.
209
+
Installing an Agent involves:
152
210
153
-
**Cons:**
154
-
* **Single Point of Failure:** If the Argo CD instance fails, all deployments may be affected.
155
-
* **Performance and Scalability Challenges:** As the number of clusters and deployments increase, the performance and scalability of a single Agent may become a limiting factor, in which case you can either switch to using multiple agents across multiple clusters.
211
+
1. Creating an Agent configuration in Harness
212
+
2. Downloading the Agent YAML manifest
213
+
3. Applying the manifest to your Kubernetes cluster using `kubectl apply`
156
214
157
-
**Multiple Target Clusters and Multiple Agents:** This is another scenario not described in the diagram. Harness GitOps manages the complexity of multiple Argo CD instances and this way of using Harness GitOps provides high scalability and isolation, allowing teams to manage deployments independently across multiple clusters and if one Argo CD instance fails, it does not impact deployments in other clusters. Although this will come with an overhead of higher **Resource Utilization** and **Management overhead**.
158
-
159
-
Installing an Agent involves setting up an Agent in Harness, downloading its YAML file, and applying the YAML file in a Kubernetes cluster (`kubectl apply`). Kubernetes then pulls the Harness and Argo CD images from their respective public repositories.
215
+
Kubernetes then pulls the Harness and Argo CD images from their respective public repositories. The Agent establishes outbound connections to Harness SaaS and begins monitoring for GitOps operations.
160
216
161
-

217
+
<divstyle={{textAlign:'center'}}>
218
+
<DocImage path={require('./static/gitops-archcitecture.png')} width="50%" height="50%" title="Click to view full size image" />
0 commit comments