Skip to content

Commit

Permalink
Merge pull request #82 from stakater/gitops-changes
Browse files Browse the repository at this point in the history
argocd apps fixes
  • Loading branch information
AsfaMumtaz authored Jun 5, 2023
2 parents de13593 + 4c1b329 commit 58e7d62
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,35 +157,37 @@ Lets proceed by adding a tenant to the `apps-gitops-config` repository.
└── stage
```

1. Add ArgoCD applications for these environments (dev & stage) defined in `gabbar/argocd-apps`. These environment belong to specific cluster.

Create dev and stage folders at `argocd-apps/` to represent dev and stage cluster.
1. Create `argocd-apps` folder at the root of your Apps GitOps repo. Create clusters folder containing the environments folder each cluster have. Add ArgoCD applications for these environments (dev & stage).

```bash
├── argocd-apps
├── dev
└── stage
├── cluster-1
├── dev
└── stage
├── cluster-2
├── dev
└── stage
```

> Folders in `argocd-apps` corresponds to clusters, these folder contain ArgoCD applications pointing to 1 or more environments inside multiple tenant folders per cluster, Folders in `gabbar/argocd-apps` correspond to environments.
> Folders in `argocd-apps` corresponds to clusters, these folders contain ArgoCD applications pointing to 1 or more environments inside multiple tenant folders per cluster. Folders in `gabbar/argocd-apps` correspond to environments.

Next, create the following ArgoCD applications:
Next, create the following ArgoCD applications in each environment, dev and stage:

```yaml
# Name: gabbar-dev.yaml (TENANT_NAME-ENV_NAME.yaml)
# Path: argocd-apps/dev
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name:
name:
namespace: openshift-gitops
spec:
destination:
namespace: TARGET_NAMESPACE_FOR_DEV
server: 'https://kubernetes.default.svc'
project: gabbar
source:
path: gabbar/argocd-apps/dev
path: argocd-apps/dev
repoURL: 'APPS_GITOPS_REPO_URL'
targetRevision: HEAD
syncPolicy:
Expand All @@ -206,7 +208,7 @@ Lets proceed by adding a tenant to the `apps-gitops-config` repository.
server: 'https://kubernetes.default.svc'
project: gabbar
source:
path: gabbar/argocd-apps/stage
path: argocd-apps/stage
repoURL: 'APPS_GITOPS_REPO_URL'
targetRevision: HEAD
syncPolicy:
Expand Down Expand Up @@ -237,7 +239,7 @@ Lets proceed by adding a tenant to the `apps-gitops-config` repository.
server: 'https://kubernetes.default.svc'
project: root-tenant
source:
path: gabbar/argocd-apps/dev
path: argocd-apps/dev
repoURL: 'APPS_GITOPS_REPO_URL'
targetRevision: HEAD
syncPolicy:
Expand Down

0 comments on commit 58e7d62

Please sign in to comment.