Skip to content

Commit 40a00de

Browse files
Mohammad Adha Bin SaharMohammad Adha Bin Sahar
authored andcommitted
Consolidate argo apps into 1 yaml file
1 parent d1f6d37 commit 40a00de

File tree

5 files changed

+77
-1
lines changed

5 files changed

+77
-1
lines changed

.github/workflows/terraform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
echo "Waiting for Docker to start..."
4747
sleep 5
4848
done
49-
fi
49+
fi
5050
fi
5151
5252
- name: Check if Minikube is running

infrastructure/argocd/argo-apps.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: log-generator
5+
namespace: argocd
6+
spec:
7+
destination:
8+
namespace: default
9+
server: https://kubernetes.default.svc
10+
project: default
11+
source:
12+
path: infrastructure/argocd/log-generator
13+
repoURL: https://github.com/adhasahar97/homelab
14+
targetRevision: HEAD
15+
syncPolicy:
16+
automated:
17+
prune: true
18+
selfHeal: true
19+
syncOptions:
20+
- CreateNamespace=true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: log-generator-deployment
5+
labels:
6+
app: log-generator
7+
spec:
8+
replicas: 3
9+
selector:
10+
matchLabels:
11+
app: log-generator
12+
template:
13+
metadata:
14+
labels:
15+
app: log-generator
16+
spec:
17+
containers:
18+
- name: log-generator
19+
image: chentex/random-logger:latest
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
data:
3+
test.js: |-
4+
import http from 'k6/http';
5+
import { sleep } from 'k6';
6+
7+
export const options = {
8+
iterations: 10,
9+
};
10+
11+
// The default exported function is gonna be picked up by k6 as the entry point for the test script. It will be executed repeatedly in "iterations" for the whole duration of the test.
12+
export default function () {
13+
// Make a GET request to the target URL
14+
http.get('https://test-api.k6.io');
15+
16+
// Sleep for 1 second to simulate real-world usage
17+
sleep(1);
18+
}
19+
kind: ConfigMap
20+
metadata:
21+
creationTimestamp: null
22+
name: my-test

infrastructure/argocd/sample/test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import http from 'k6/http';
2+
import { sleep } from 'k6';
3+
4+
export const options = {
5+
iterations: 10,
6+
};
7+
8+
// The default exported function is gonna be picked up by k6 as the entry point for the test script. It will be executed repeatedly in "iterations" for the whole duration of the test.
9+
export default function () {
10+
// Make a GET request to the target URL
11+
http.get('https://test-api.k6.io');
12+
13+
// Sleep for 1 second to simulate real-world usage
14+
sleep(1);
15+
}

0 commit comments

Comments
 (0)