Skip to content

Commit 0bc075a

Browse files
authored
chore: add pvc for postgresql and elasticsearch (#149)
* chore: add pvc for postgresql and elasticsearch * fix: update pvc settings and names
1 parent 338adb7 commit 0bc075a

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: argilla-user-feedback-pvc
6+
labels:
7+
app: morpheus-feedback-api
8+
spec:
9+
accessModes:
10+
- ReadWriteOnce
11+
resources:
12+
requests:
13+
storage: 5Gi

kustomize/base/argilla/deployment.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ spec:
99
selector:
1010
matchLabels:
1111
app: morpheus-feedback-api
12+
strategy:
13+
type: Recreate
1214
template:
1315
metadata:
1416
labels:
1517
app: morpheus-feedback-api
1618
spec:
19+
restartPolicy: Always
1720
imagePullSecrets:
1821
- name: argilla-user-feedback-ips
1922
serviceAccountName: argilla
23+
securityContext:
24+
fsGroup: 1000
2025
containers:
2126
- name: flask-service
2227
image: quay.io/exploit-iq/user-feedback-api:latest
@@ -33,7 +38,6 @@ spec:
3338
value: rh-argilla
3439
- name: ARGILLA_API_URL
3540
value: 'http://argilla:6900'
36-
# Internal Argilla endpoint
3741
- name: argilla-server
3842
image: argilla/argilla-server:latest
3943
imagePullPolicy: IfNotPresent
@@ -76,24 +80,23 @@ spec:
7680
- name: elasticsearch
7781
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
7882
imagePullPolicy: IfNotPresent
83+
volumeMounts:
84+
- mountPath: /usr/share/elasticsearch/data
85+
name: user-feedback-storage
86+
subPath: elasticsearch
7987
env:
8088
- name: node.name
8189
value: "elasticsearch"
82-
8390
- name: ES_JAVA_OPTS
8491
value: "-Xms512m -Xmx512m"
85-
8692
- name: discovery.type
8793
value: "single-node"
88-
8994
- name: cluster.name
9095
value: "es-argilla-local"
91-
9296
- name: cluster.routing.allocation.disk.threshold_enabled
9397
value: "false"
94-
9598
- name: xpack.security.enabled
96-
value: "false"
99+
value: "false"
97100
- name: postgresql
98101
image: postgres:13
99102
imagePullPolicy: IfNotPresent
@@ -103,4 +106,13 @@ spec:
103106
- name: POSTGRES_PASSWORD
104107
value: postgres
105108
- name: POSTGRES_DB
106-
value: argilla
109+
value: argilla
110+
volumeMounts:
111+
- name: user-feedback-storage
112+
mountPath: /var/lib/postgresql
113+
subPath: postgres
114+
serviceAccount: argilla
115+
volumes:
116+
- name: user-feedback-storage
117+
persistentVolumeClaim:
118+
claimName: argilla-user-feedback-pvc

kustomize/base/argilla/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ resources:
88
- sa.yaml
99
- service.yaml
1010
- argilla-route.yaml
11+
- argilla-user-feedback-pvc.yaml
1112

1213
secretGenerator:
1314
- name: argilla-feedback-secret

0 commit comments

Comments
 (0)