Skip to content

Commit 7d4ab0a

Browse files
Merge pull request #24 from AET-DevOps25/feat/improve-monitoring
Feat/improve monitoring
2 parents 61ea524 + 17622d5 commit 7d4ab0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2484
-1257
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
workflows: [CI Pipeline]
66
types:
77
- completed
8+
conclusion: success
9+
workflow_dispatch:
810

911
jobs:
1012
# Check if we should deploy based on the workflow_run event
1113
evaluate_deployment:
1214
name: Evaluate Deployment Conditions
1315
runs-on: ubuntu-latest
14-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
1517
outputs:
1618
deploy_environment: ${{ steps.set-env.outputs.environment }}
1719
should_deploy: ${{ steps.set-env.outputs.should_deploy }}

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,14 @@ jobs:
289289
id: build-args
290290
run: |
291291
if [[ "${{ matrix.service }}" == "client" ]]; then
292-
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
292+
# Detect target branch for push or pull_request
293+
TARGET_BRANCH="${{ github.ref }}"
294+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
295+
TARGET_BRANCH="${{ github.base_ref }}"
296+
fi
297+
if [[ "$TARGET_BRANCH" == "refs/heads/main" || "$TARGET_BRANCH" == "main" ]]; then
293298
echo "build_env=production" >> $GITHUB_OUTPUT
294-
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
299+
elif [[ "$TARGET_BRANCH" == "refs/heads/dev" || "$TARGET_BRANCH" == "dev" ]]; then
295300
echo "build_env=staging" >> $GITHUB_OUTPUT
296301
else
297302
echo "build_env=development" >> $GITHUB_OUTPUT

gateway/src/main/java/de/tum/aet/devops25/JwtAuthenticationFilter.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
2525
String path = exchange.getRequest().getURI().getPath();
2626
String method = exchange.getRequest().getMethod().toString();
2727

28-
// Skip authentication for actuator endpoints
29-
if (path.startsWith("/actuator/")) {
30-
//System.out.println("[AUTH_DEBUG] Skipping authentication for actuator endpoint: " + path);
28+
// Skip authentication for endpoints that don't require it
29+
if (path.startsWith("/actuator/") ||
30+
path.equals("/health") ||
31+
path.equals("/api/health") ||
32+
path.equals("/auth/register") ||
33+
path.equals("/api/auth/register") ||
34+
path.equals("/auth/login") ||
35+
path.equals("/api/auth/login")) {
36+
System.out.println("[AUTH_DEBUG] Skipping authentication for public endpoint: " + path);
3137
return chain.filter(exchange);
3238
}
3339

genai-svc/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ boto3 >= 1.29.0
4040
botocore >= 1.32.0
4141
pypdf >= 3.15.1
4242
python-docx >= 0.8.11
43+
44+
# Monitoring and metrics
45+
prometheus_flask_exporter >= 0.20.0

helm/ai-event-concepter/templates/client-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ spec:
1212
- port: {{ .Values.client.service.port }}
1313
targetPort: {{ .Values.client.service.targetPort }}
1414
protocol: TCP
15+
name: http
1516
type: {{ .Values.client.service.type }}

helm/ai-event-concepter/templates/concept-svc-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ spec:
1212
- port: {{ .Values.conceptsvc.service.port }}
1313
targetPort: {{ .Values.conceptsvc.service.targetPort }}
1414
protocol: TCP
15+
name: http
1516
type: {{ .Values.conceptsvc.service.type }}

helm/ai-event-concepter/templates/gateway-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ spec:
1212
- port: {{ .Values.gateway.service.port }}
1313
targetPort: {{ .Values.gateway.service.targetPort }}
1414
protocol: TCP
15+
name: http
1516
type: {{ .Values.gateway.service.type }}

helm/ai-event-concepter/templates/genai-svc-minio-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: genai-svc-minio
5+
labels:
6+
app: genai-svc-minio
7+
monitoring: "true"
58
spec:
69
selector:
710
app: ai-event-concepter-genai-svc-minio-selector

helm/ai-event-concepter/templates/genai-svc-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ spec:
1212
- port: {{ .Values.genaisvc.service.port }}
1313
targetPort: {{ .Values.genaisvc.service.targetPort }}
1414
protocol: TCP
15+
name: http
1516
type: {{ .Values.genaisvc.service.type }}

helm/ai-event-concepter/templates/genai-svc-t2v-transformers-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: genai-svc-t2v-transformers
5+
labels:
6+
app: genai-svc-t2v-transformers
7+
monitoring: "true"
58
spec:
69
selector:
710
app: ai-event-concepter-genai-svc-t2v-transformers-selector
811
ports:
912
- port: {{ .Values.genaisvct2vtransformers.service.port }}
1013
targetPort: {{ .Values.genaisvct2vtransformers.service.targetPort }}
14+
name: http
1115
type: {{ .Values.genaisvct2vtransformers.service.type }}

0 commit comments

Comments
 (0)