Skip to content

Commit 27439ed

Browse files
committed
patch(k8s): update deployment files and add a RBAC file
1 parent e21f1c3 commit 27439ed

10 files changed

+45
-49
lines changed

deploy/examples/sample-aiprovider-ollama.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

deploy/examples/sample-patternlibrary.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

deploy/examples/sample-podmortem.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/main/kubernetes/ai-interface-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: podmortem-ai-interface-service
6+
namespace: podmortem-system
67
spec:
78
replicas: 1
89
selector:

src/main/kubernetes/ai-interface-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: podmortem-ai-interface-service
6+
namespace: podmortem-system
67
spec:
78
selector:
89
app: podmortem-ai-interface-service

src/main/kubernetes/log-parser-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: podmortem-log-parser-service
6+
namespace: podmortem-system
67
spec:
78
replicas: 1
89
selector:
@@ -13,6 +14,14 @@ spec:
1314
labels:
1415
app: podmortem-log-parser-service
1516
spec:
17+
# Ensure this pod runs on the same node as the operator for ReadWriteOnce volume sharing
18+
affinity:
19+
podAffinity:
20+
requiredDuringSchedulingIgnoredDuringExecution:
21+
- labelSelector:
22+
matchLabels:
23+
app: podmortem-operator
24+
topologyKey: kubernetes.io/hostname
1625
containers:
1726
- name: log-parser
1827
image: ghcr.io/podmortem/podmortem-log-parser:latest

src/main/kubernetes/log-parser-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: podmortem-log-parser-service
6+
namespace: podmortem-system
67
spec:
78
selector:
89
app: podmortem-log-parser-service

src/main/kubernetes/operator-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
fieldPath: metadata.name
4848
- name: OPERATOR_NAME
4949
value: "podmortem-operator"
50+
- name: QUARKUS_REST_CLIENT_LOG_PARSER_URL
51+
value: "http://podmortem-log-parser-service.podmortem-system.svc.cluster.local:8080"
52+
- name: QUARKUS_REST_CLIENT_AI_INTERFACE_URL
53+
value: "http://podmortem-ai-interface-service.podmortem-system.svc.cluster.local:8080"
5054
resources:
5155
limits:
5256
memory: "512Mi"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: podmortem-operator
5+
rules:
6+
- apiGroups: ["podmortem.redhat.com"]
7+
resources: ["aiproviders", "podmortems", "patternlibraries"]
8+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
9+
- apiGroups: [""]
10+
resources: ["pods", "configmaps", "secrets", "events"]
11+
verbs: ["get", "list", "watch"]
12+
- apiGroups: ["podmortem.redhat.com"]
13+
resources: ["*"]
14+
verbs: ["patch"]
15+
16+
---
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: ClusterRoleBinding
19+
metadata:
20+
name: podmortem-operator
21+
roleRef:
22+
apiGroup: rbac.authorization.k8s.io
23+
kind: ClusterRole
24+
name: podmortem-operator
25+
subjects:
26+
- kind: ServiceAccount
27+
name: podmortem-operator
28+
namespace: podmortem-system

src/main/kubernetes/pattern-cache-pvc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
namespace: podmortem-system
77
spec:
88
accessModes:
9-
- ReadWriteMany
9+
- ReadWriteOnce
1010
resources:
1111
requests:
1212
storage: 5Gi

0 commit comments

Comments
 (0)