Skip to content

Commit 0cc95da

Browse files
committed
Removed sync section when automated sync policy is used
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
1 parent 30f5f08 commit 0cc95da

1 file changed

Lines changed: 4 additions & 78 deletions

File tree

docs/OpenShift GitOps CLI User Guide.md

Lines changed: 4 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -626,80 +626,6 @@ $ compinit
626626
# argocd app list --core
627627
```
628628
629-
630-
## Syncing an application by using OpenShift GitOps argocd CLI
631-
632-
### Syncing an application in normal mode
633-
#### Prerequisites
634-
635-
- OpenShift CLI (oc)
636-
- OpenShift GitOps CLI (argocd)
637-
#### Procedure
638-
639-
1. Get the admin password for the ArgoCD server
640-
```
641-
# ADMIN_PASSWD=$(oc get secret openshift-gitops-cluster -n openshift-gitops -o jsonpath='{.data.admin\.password}' | base64 -d)
642-
```
643-
2. Get the ArgoCD server url using the following command
644-
```
645-
# SERVER_URL=$(oc get routes openshift-gitops-server -n openshift-gitops -o jsonpath='{.status.ingress[0].host}')
646-
```
647-
3. Login to the ArgoCD server using the login command
648-
```
649-
# argocd login --username admin --password ${ADMIN_PASSWD} ${SERVER_URL}
650-
```
651-
eg:
652-
```
653-
# get the admin password and use it by enclosing in single quotes.
654-
# echo ${ADMIN_PASSWD}
655-
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
656-
```
657-
**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.
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
659-
```
660-
# argocd app sync openshift-gitops/app-spring-petclinic
661-
```
662-
5. List the application to confirm that the application has reached the state `Synced` and the health of the application is `Healthy`.
663-
```
664-
# argocd app list
665-
```
666-
### Syncing an application in core mode
667-
#### Prerequisites
668-
669-
- OpenShift CLI (oc)
670-
- OpenShift GitOps CLI (argocd)
671-
672-
#### Procedure
673-
674-
1. Login to the OpenShift Cluster using the `oc` CLI tool
675-
```
676-
# oc login -u [username] -p [password] [server_url]
677-
```
678-
eg:
679-
```
680-
# oc login -u kubeadmin -p '<password>' https://api.crc.testing:6443
681-
```
682-
2. Check if the context is set correctly in the kubeconfig file
683-
```
684-
# oc config current-context
685-
```
686-
3. Set the default namespace of the current context to `openshift-gitops`
687-
```
688-
# oc config set-context --current --namespace openshift-gitops
689-
```
690-
4. Set the following environment variables to override the argocd component names
691-
```
692-
# export ARGOCD_REPO_SERVER_NAME=openshift-gitops-repo-server
693-
```
694-
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
695-
```
696-
# argocd app sync --core openshift-gitops/app-spring-petclinic
697-
```
698-
6. List the application to confirm that the application has reached the state `Synced` and the health of the application is `Healthy`.
699-
```
700-
# argocd app list --core
701-
```
702-
703629
## Declarative cluster configuration using OpenShift GitOps argocd CLI
704630
705631
### Create cluster config application in Normal mode
@@ -754,7 +680,7 @@ $ compinit
754680
```
755681
# oc label ns spring-petclinic "argocd.argoproj.io/managed-by=openshift-gitops"
756682
```
757-
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`.
683+
6. List the application to confirm that the application is created successfully. The application will stay in the state `OutOfSync` as the sync policy was set to `none` and the health of the application is `Healthy`.
758684
```
759685
# argocd app list
760686
```
@@ -809,7 +735,7 @@ $ compinit
809735
--sync-option Prune=true \
810736
--sync-option CreateNamespace=true
811737
```
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`.
738+
7. List the application to confirm that the application is created successfully. The application will stay in the state `OutOfSync` as the sync policy was set to `none` and the health of the application is `Healthy`.
813739
```
814740
# argocd app list --core
815741
```
@@ -841,7 +767,7 @@ $ compinit
841767
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
842768
```
843769
**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.
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
770+
4. As the argo application is created with sync policy `none`, user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
845771
```
846772
# argocd app sync openshift-gitops/cluster-configs
847773
```
@@ -878,7 +804,7 @@ $ compinit
878804
```
879805
# export ARGOCD_REPO_SERVER_NAME=openshift-gitops-repo-server
880806
```
881-
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
807+
5. As the argo application is created with sync policy `none`, user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in core mode as below
882808
```
883809
# argocd app sync --core openshift-gitops/cluster-configs
884810
```

0 commit comments

Comments
 (0)