Skip to content

Commit 79febd1

Browse files
committed
added a section for deploying additional argo cd instances
1 parent 38a6027 commit 79febd1

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This repository contains a brief Getting Started guide for trying out OpenShift
88
* [Log into Argo CD dashboard](#log-into-argo-cd-dashboard)
99
* [Configure OpenShift with Argo CD](#configure-openshift-with-argo-cd)
1010
* [Deploy Applications with Argo CD](#deploy-applications-with-argo-cd)
11+
* [Additional Argo CD instances](#additional-argo-cd-instances)
1112

1213
## Install OpenShift GitOps
1314

@@ -139,4 +140,43 @@ You would notice that the deployment momentarily scales up to 2 pods and immedia
139140
140141
In Argo CD dashboard, click on the **app-spring-petclinic** and then **App Details** → **Events**. You can see the event details of Argo CD detecting that the deployment resources is out of sync on the cluster and resyncing the Git repository to correct it.
141142
142-
![Argo CD - Events](images/gitops-13.png)
143+
![Argo CD - Events](images/gitops-13.png)
144+
145+
146+
## Additional Argo CD instances
147+
148+
Although OpenShift GitOps by default installs an Argo CD instance for the cluster, there are use-cases where different application teams might need their own Argo CD instance confined to their own namespaces and applications. Therefore, OpenShift GitOps support creating additional Argo CD instances declaratively through creating `ArgoCD` resources.
149+
150+
In the OpenShift Web Console, create a project called `myargocd` and then click on the plus sign in the top navigation bar to then paste the following in the YAML editor, and then click on **Create**.
151+
152+
```
153+
apiVersion: argoproj.io/v1alpha1
154+
kind: ArgoCD
155+
metadata:
156+
name: myargocd
157+
spec:
158+
server:
159+
route:
160+
enabled: true
161+
```
162+
163+
![Argo CD](images/gitops-16.png)
164+
165+
> Alternatively, you can run the following CLI commands:
166+
> ```
167+
> oc new-project myargocd
168+
> oc create -f argo/argocd.yaml
169+
> ```
170+
171+
Click on the **Topology** to view the Argo CD instance deployed in your names.
172+
173+
![Argo CD](images/gitops-17.png)
174+
175+
Click on the Argo CD URL to open the Argo CD dashboard.
176+
177+
As described previously, Argo CD upon installation generates an initial admin password which is stored in a Kubernetes secret called `[argocd-name]-cluster`. Run the following command to decrypt the `admin` password and log into Argo CD dashboard:
178+
179+
```
180+
kubectl get secret myargocd-cluster -n myargocd -ojsonpath='{.data.admin\.password}' | base64 -d
181+
```
182+

argo/argocd.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: ArgoCD
3+
metadata:
4+
name: myargocd
5+
spec:
6+
server:
7+
route:
8+
enabled: true

images/gitops-16.png

75.9 KB
Loading

images/gitops-17.png

133 KB
Loading

0 commit comments

Comments
 (0)