Skip to content

Commit

Permalink
feat: refactor worker to base deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Miglinci <[email protected]>
  • Loading branch information
pmig authored and cdxker committed Aug 30, 2024
1 parent db01f8a commit 2e2e0e9
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 119 deletions.
2 changes: 0 additions & 2 deletions glasskube/trieve/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ data:
BASE_SERVER_URL: "http://api.localtrieve.com"
REDIS_URL: "redis://redis:6379"
QDRANT_URL: "http://trieve-qdrant-qdrant:6334"
# QDRANT_API_KEY: "FROM SECRET" # FROM SECRET
QUANTIZE_VECTORS: "false"
REPLICATION_FACTOR: "2"
VECTOR_SIZES: "384,512,768,1024,1536,3072"
# DATABASE_URL: "FROM_SCERET"
SMTP_RELAY: "smtp.fastmail.com"
SMTP_USERNAME: "[email protected]"
SMTP_PASSWORD: "FROM SECRET"
Expand Down
2 changes: 2 additions & 0 deletions glasskube/trieve/embeddings/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
resources:
- deployment.yaml
- service.yaml


5 changes: 3 additions & 2 deletions glasskube/trieve/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ namespace: default
commonLabels:
app.kubernetes.io/name: trieve
app.kubernetes.io/part-of: trieve
app.kubernetes.io/instance: test
app.kubernetes.io/instance: trieve
resources:
- configmap.yaml
- clickhouse.yaml
- keycloak
- server
- ui
- worker
- sync-qdrant # really needed?
- ingest
- embeddings

Expand All @@ -19,6 +18,8 @@ images:
newTag: cpu-1.4
- name: trieve/ingest
newTag: sha-d8b18ca
- name: trieve/sync_qdrant
newTag: sha-d8b18ca
- name: trieve/server
newTag: sha-d8b18ca
- name: trieve/analytics-site
Expand Down
31 changes: 0 additions & 31 deletions glasskube/trieve/sync-qdrant/deployment.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions glasskube/trieve/sync-qdrant/kustomization.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: trieve-delete-worker
name: trieve-worker
spec:
selector: {}
template:
spec:
containers:
- name: delete-worker
image: trieve/delete-worker
- name: worker
image: worker
ports:
- containerPort: 80
env:
- name: DATABASE_URL
valueFrom:
Expand All @@ -26,4 +28,4 @@ spec:
resources:
limits:
cpu: "1"
memory: 100Mi
memory: 200Mi
2 changes: 2 additions & 0 deletions glasskube/trieve/worker/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- deployment.yaml
4 changes: 0 additions & 4 deletions glasskube/trieve/worker/delete-worker/kustomization.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions glasskube/trieve/worker/delete/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-delete
nameSuffix: -delete
resources:
- ../base
images:
- name: worker
newName: trieve/delete-worker
29 changes: 0 additions & 29 deletions glasskube/trieve/worker/file-worker/deployment.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions glasskube/trieve/worker/file-worker/kustomization.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions glasskube/trieve/worker/file/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-file
nameSuffix: -file
resources:
- ../base
images:
- name: worker
newName: trieve/file-worker
29 changes: 0 additions & 29 deletions glasskube/trieve/worker/group-worker/deployment.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions glasskube/trieve/worker/group-worker/kustomization.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions glasskube/trieve/worker/group/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-file
nameSuffix: -group
resources:
- ../base
images:
- name: worker
newName: trieve/file-worker
7 changes: 4 additions & 3 deletions glasskube/trieve/worker/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resources:
- delete-worker
- file-worker
- group-worker
- delete
- file
- group
- sync-qdrant
16 changes: 16 additions & 0 deletions glasskube/trieve/worker/sync-qdrant/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
commonLabels:
app.kubernetes.io/component: worker-sync-qdrant
nameSuffix: -sync-qdrant
resources:
- ../base
images:
- name: worker
newName: trieve/sync_qdrant
patches:
- target:
kind: Deployment
name: trieve-worker
patch: |-
- op: add
path: /spec/replicas
value: 0 # this deployment functions more like a "Job"

0 comments on commit 2e2e0e9

Please sign in to comment.