Skip to content

Commit dd2a802

Browse files
committed
feat: add k3d cluster setup script
1 parent ae41663 commit dd2a802

10 files changed

Lines changed: 97 additions & 12 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ dist/**
9494

9595
clients/python-sdk/dist
9696
pdf2md/ch_migrations/chm.toml
97-
clients/trieve-shopify-extension/shopify.app.skept-trieve-extension-test.toml
97+
clients/trieve-shopify-extension/shopify.app.skept-trieve-extension-test.toml
98+
helm/charts/

helm/Chart.lock

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,14 @@ dependencies:
88
- name: altinity-clickhouse-operator
99
repository: https://docs.altinity.com/clickhouse-operator/
1010
version: 0.24.4
11-
digest: sha256:ededf3f70c582f126598b611e9afea9e470d54e89504f6297d545ba35679758c
12-
generated: "2025-02-27T18:02:34.953944331-08:00"
11+
- name: cloudnative-pg
12+
repository: https://cloudnative-pg.github.io/charts
13+
version: 0.23.0
14+
- name: minio
15+
repository: https://charts.min.io/
16+
version: 5.4.0
17+
- name: redis
18+
repository: https://charts.bitnami.com/bitnami
19+
version: 20.10.0
20+
digest: sha256:5296b4c787eb3ae9f1ca02df108eddbf4e0ddc5b29e17a685c35121c81864c70
21+
generated: "2025-02-28T00:09:14.685188891-08:00"

helm/Chart.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88
- name: qdrant
99
repository: https://qdrant.github.io/qdrant-helm
1010
version: 1.13.4
11-
condition: qdrant.subchart
11+
condition: qdrant.enabled
1212
- name: keycloak-operator
1313
repository: https://kbumsik.io/keycloak-kubernetes/
1414
version: 0.0.4
@@ -17,3 +17,15 @@ dependencies:
1717
repository: https://docs.altinity.com/clickhouse-operator/
1818
version: 0.24.4
1919
condition: clickhouse.enabled
20+
- name: cloudnative-pg
21+
repository: https://cloudnative-pg.github.io/charts
22+
version: 0.23.0
23+
condition: postgres.enabled
24+
- name: minio
25+
version: 5.4.0
26+
repository: https://charts.min.io/
27+
condition: minio.enabled
28+
- name: redis
29+
repository: https://charts.bitnami.com/bitnami
30+
version: 20.10.0
31+
condition: redis.enabled

helm/templates/clickhouse-deployment.yaml

Whitespace-only changes.

helm/templates/keycloak-deployment.yaml

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: postgresql.cnpg.io/v1
2+
kind: Cluster
3+
metadata:
4+
name: postgresql-cluster
5+
annotations:
6+
"helm.sh/hook-weight": "5"
7+
spec:
8+
{{ toYaml $.Values.postgres.spec | nindent 2 }}

helm/test-production/cnpg/postgresql-instance.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@ kind: Cluster
33
metadata:
44
name: postgresql-cluster
55
spec:
6-
instances: 1
7-
8-
storage:
9-
size: 50Gi
6+
{{ toYaml $Values.postgres.spec | nindent 2 }}

helm/values.local.yaml

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
1-
environment: local # Set to aws if deploying to
2-
useGpu: false
1+
postgres:
2+
enabled: true
3+
dbURI: "postgres://postgres:password@postgres.default.svc.cluster.local:5432/trieve"
4+
spec:
5+
# CloudNativePg template spec
6+
instances: 1
7+
storage:
8+
size: 10Gi
9+
10+
clickhouse:
11+
enabled: true
12+
13+
minio:
14+
enabled: true
15+
16+
qdrant:
17+
enabled: true
18+
# Qdrant values.yaml spec
19+
replicaCount: 3
20+
livenessProbe:
21+
enabled: false
22+
# HIGHLY RECOMMENDED QDRANT NODES go on a dedicated node
23+
# tolerations:
24+
# - key: "qdrant-node"
25+
# operator: "Exists"
26+
# effect: "NoSchedule"
27+
metrics:
28+
serviceMonitor:
29+
enabled: false
30+
podDisruptionBudget:
31+
enabled: false
32+
maxUnavailable: 1
33+
apiKey: "qdrant-api-key"
34+
requests:
35+
cpu: 1
36+
memory: 10Gi
37+
38+
redis:
39+
enabled: true
40+
metrics:
41+
enabled: false
42+
serviceMonitor:
43+
enabled: false
44+
auth:
45+
password: "password"
46+
master:
47+
disableCommands: []
48+
persistence:
49+
enabled: false
50+
pdb:
51+
create: false
52+
resources:
53+
limits:
54+
memory: 5Gi
55+
replica:
56+
replicaCount: 0
57+
358
containers:
459
server:
560
tag: latest
@@ -57,8 +112,6 @@ domains:
57112
chat:
58113
host: chat.localtrieve.com
59114
class: nginx
60-
postgres:
61-
dbURI: "postgres://postgres:password@postgres.default.svc.cluster.local:5432/trieve"
62115
config:
63116
vite:
64117
apiHost: http://api.localtrieve.com/api

scripts/k3d-cluster.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
k3d cluster create somename --config ./scripts/k3d-config.yaml

scripts/k3d-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: k3d.io/v1alpha5
2+
kind: Simple
3+
servers: 1 # same as `--servers 1`
4+
agents: 3 # same as `--agents 2`

0 commit comments

Comments
 (0)