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/OpenShift GitOps CLI User Guide.md
+80-37Lines changed: 80 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,44 +214,52 @@ In the normal mode (default mode), the `argocd` CLI client makes API requests to
214
214
215
215
#### Core mode
216
216
217
-
In the `core` mode (`--core` argument specified), the CLI talks directly to the Kubernetes API server (unlike in normal mode, where the CLI talks to the ArgoCD Server) using the credentials set in the kubeconfig file. The default kubeconfig file is available at location `$HOME/.kube/config` can be customized using the `KUBECONFIG` environment variable. Unlike the normal mode, there is no explicit login step required for user authentication. The command would be executed using the credentials provided in the `kubeconfig` file. ArgoCD commands can be executed in the core mode using one of the following options.
217
+
In the `core` mode (`--core` argument specified), the CLI talks directly to the Kubernetes API server (unlike in normal mode, where the CLI talks to the ArgoCD Server) using the credentials set in the kubeconfig file. The default kubeconfig file is available at location `$HOME/.kube/config` can be customized using the `KUBECONFIG` environment variable. Unlike the normal mode, there is no explicit login step required for user authentication. The command would be executed using the credentials provided in the `kubeconfig` file.
218
218
219
-
##### Option 1: With default kubeconfig file (using the default context)
219
+
##### Steps to execute command in the core mode
220
+
221
+
1. ArgoCD commands can be executed in the core mode using one of the following options.
222
+
223
+
###### Option 1: With default kubeconfig file (using the default context)
220
224
```
221
225
# argocd --core [command or options][arguments…]
222
226
```
223
227
eg:
224
228
```
225
-
# argocd --core app list
229
+
# ARGOCD_REPO_SERVER_NAME=openshift-gitops-repo-server argocd --core app list
230
+
(or)
231
+
# argocd --core app list --repo-server-name openshift-gitops-repo-server
226
232
```
227
-
##### Option 2: With default kubeconfig file (using a custom context)
233
+
###### Option 2: With default kubeconfig file (using a custom context)
228
234
```
229
235
# argocd --core --kube-context [context][command or options][arguments…]
230
236
```
231
237
eg:
232
238
```
233
-
# argocd --core --kube-context kubeadmin-local app list
239
+
# ARGOCD_REPO_SERVER_NAME=openshift-gitops-repo-server argocd --core --kube-context kubeadmin-local app list
240
+
(or)
241
+
# argocd --core --kube-context kubeadmin-local app list --repo-server-name openshift-gitops-repo-server
234
242
```
235
243
236
-
##### Option 3: With a custom kubeconfig file (using the default context)
244
+
###### Option 3: With a custom kubeconfig file (using the default context)
237
245
```
238
246
# KUBECONFIG=~/.kube/custom_config argocd --core [command or options][arguments…]
239
247
```
240
248
eg:
241
249
```
242
-
# KUBECONFIG=~/.kube/custom_config argocd --core app list
250
+
# KUBECONFIG=~/.kube/custom_config argocd --core app list --repo-server-name openshift-gitops-repo-server
243
251
```
244
252
245
-
##### Option 4: With a custom kubeconfig file (using a custom context)
253
+
###### Option 4: With a custom kubeconfig file (using a custom context)
246
254
```
247
255
# KUBECONFIG=~/.kube/custom_config argocd --core --kube-context [context][command or options][arguments…]
248
256
```
249
257
eg:
250
258
```
251
-
# KUBECONFIG=~/.kube/custom_config argocd --kube-context kubeadmin-local --core app list
259
+
# KUBECONFIG=~/.kube/custom_config argocd --kube-context kubeadmin-local --core app list --repo-server-name openshift-gitops-repo-server
252
260
```
253
261
254
-
**NOTE** If there are multiple ArgoCD instances, then set the default namespace of the current context to interact withthe right ArgoCD instance.
262
+
**NOTE** If there are multiple ArgoCD instances, then set the default namespace of the current context to the namespace of the ArgoCD instance that you want to interact with. Also set the environment variable `ARGOCD_REPO_SERVER_NAME` or use the command line option `--repo-server-name` to specify the repo server component name in the format `<argocd-instance-name>-repo-server`.
255
263
256
264
### Global options
257
265
Global options are options applicable to all sub-commands of `argocd`.
5. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and `Healthy`
564
+
6. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and the health of the application is `Healthy`.
6. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and `Healthy`
620
+
7. Label the destination namespace `spring-petclinic` to be managed by `openshif-gitops` argocd instance as below
8. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and the health of the application is `Healthy`.
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
640
-
641
-
3. If the argo application is created with manual sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in normal mode as below
658
+
4. If the argo application is created with `none` sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in normal mode as below
4. If the argo application is created with manual sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
690
+
4. Set the following environment variables to override the argocd component names
5. If the argo application is created with `none` sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
5. Label the destination namespace `spring-petclinic` to be managed by `openshif-gitops` argocd instance as below
726
754
```
727
-
5. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and `Healthy`
6. List the application to confirm that the application is created successfully. The application will stay in the state `OutOfSync` since the sync policy is set to `none`and the health of the application is `Healthy`.
6. List the application to confirm that the application is created successfully and repeat the command till the application reaches the state `Synced` and `Healthy`
812
+
7. List the application to confirm that the application is created successfully. The application will stay in the state `OutOfSync` since the sync policy is set to `none` and the health of the application is `Healthy`.
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
812
-
3. If the argo application is created with manual sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in normal mode as below
844
+
4. Since the argo application is created with a `none` sync policy, user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
4. If the argo application is created with manual sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
877
+
4. Set the following environment variables to override the argocd component names
5. Since the argo application is created with a `none` sync policy, user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
0 commit comments