Skip to content

Commit d5e210e

Browse files
committed
feat: add the start of an example deploy repo for testing and validation
This internal deploy repo example can be used to validate our tools against a deploy repo and can be used to stand up a test environment for other validations.
1 parent f250118 commit d5e210e

5 files changed

Lines changed: 114 additions & 0 deletions

File tree

examples/deploy-repo/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# deploy-repo
2+
3+
This is an example of a Deployment Repo per the documentation.
4+
5+
It defines all 3 environment types:
6+
7+
- Management
8+
- Global
9+
- Site
10+
11+
The Management is in the `mgmt` directory. The Global is in the
12+
`global` directory. With one Site in `site`.
13+
14+
## Quick Test
15+
16+
The following will stand up 3 test clusters.
17+
18+
```bash
19+
./scripts/e2e-test-setup.sh setup
20+
```
21+
22+
Then you can switch to the `mgmt` cluster.
23+
24+
```bash
25+
kubectl ctx kind-mgmt
26+
```
27+
28+
Then load the ArgoCD configuration.
29+
30+
```bash
31+
kustomize build --load-restrictor LoadRestrictionsNone \
32+
./examples/deploy-repo/mgmt/apps/argocd/ \
33+
| kubectl -n argocd apply -f -
34+
```
35+
36+
Now get access to ArgoCD.
37+
38+
```bash
39+
kubectl -n argocd get secret argocd-initial-admin-secret \
40+
-o jsonpath='{.data.password}' | base64 -d
41+
```
42+
43+
```bash
44+
kubectl port-forward svc/argocd-server -n argocd 8080:443
45+
```
46+
47+
Go to <http://127.0.0.1:8080>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
global:
2+
cilium:
3+
enabled: false
4+
5+
openebs:
6+
enabled: false
7+
8+
rook:
9+
enabled: false
10+
11+
site:
12+
enabled: false
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: ApplicationSet
3+
metadata:
4+
name: understack
5+
spec:
6+
goTemplate: true
7+
goTemplateOptions: ["missingkey=error"]
8+
generators:
9+
- clusters:
10+
selector:
11+
matchExpressions:
12+
- key: understack.rackspace.com/role
13+
operator: In
14+
values:
15+
- "global"
16+
- "site"
17+
- "aio"
18+
template:
19+
metadata:
20+
name: '{{.name}}-understack'
21+
spec:
22+
project: default
23+
sources:
24+
- repoURL: https://github.com/rackerlabs/understack.git
25+
targetRevision: HEAD
26+
path: charts/argocd-understack
27+
helm:
28+
releaseName: '{{.name}}'
29+
valueFiles:
30+
- /examples/deploy-repo/{{.name}}/argocd-understack-values.yaml
31+
valuesObject:
32+
cluster_server: '{{.server}}'
33+
deploy_url: https://github.com/rackerlabs/understack.git
34+
deploy_ref: HEAD
35+
deploy_path_prefix: 'examples/deploy-repo'
36+
destination:
37+
name: "in-cluster"
38+
namespace: argocd
39+
syncPolicy:
40+
automated:
41+
prune: false
42+
selfHeal: false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- ../../../../../apps/appsets/project-understack-infra.yaml
5+
- ../../../../../apps/appsets/project-understack-operators.yaml
6+
- ../../../../../apps/appsets/project-understack.yaml
7+
- appset-of-understack.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
site:
2+
rook:
3+
enabled: false
4+
5+
global:
6+
enabled: false

0 commit comments

Comments
 (0)