Skip to content

Commit

Permalink
rename the cluster (#1152)
Browse files Browse the repository at this point in the history
  • Loading branch information
ganochenkodg authored Feb 26, 2024
1 parent 394477c commit f05935a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion databases/qdrant/docker/chatbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.12-slim-bookworm

ENV QDRANT_URL http://qdrant:6333
ENV QDRANT_URL http://qdrant-database:6333
ENV COLLECTION_NAME training-docs
RUN apt update && \
apt install -y --no-install-recommends gcc libc6-dev && \
Expand Down
2 changes: 1 addition & 1 deletion databases/qdrant/docker/embed-docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.12-slim-bookworm

ENV QDRANT_URL http://qdrant:6333
ENV QDRANT_URL http://qdrant-qdrant:6333
ENV COLLECTION_NAME training-docs
RUN apt update && \
apt install -y --no-install-recommends gcc libc6-dev && \
Expand Down
2 changes: 1 addition & 1 deletion databases/qdrant/docker/embed-docs/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def kube_create_job_object(name, container_image, bucket_name, f_name, namespace
client.V1EnvVar(name="COLLECTION_NAME", value="training-docs"),
client.V1EnvVar(name="FILE_NAME", value=f_name),
client.V1EnvVar(name="BUCKET_NAME", value=bucket_name),
client.V1EnvVar(name="APIKEY", value_from=client.V1EnvVarSource(secret_key_ref=client.V1SecretKeySelector(key="api-key", name="qdrant-apikey"))),
client.V1EnvVar(name="APIKEY", value_from=client.V1EnvVarSource(secret_key_ref=client.V1SecretKeySelector(key="api-key", name="qdrant-database-apikey"))),
]

container = client.V1Container(name=container_name, image=container_image, env=env_list)
Expand Down
5 changes: 2 additions & 3 deletions databases/qdrant/manifests/01-regional-pd/ha-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ spec:
resourceKind: StatefulSet
selector:
matchLabels:
app.kubernetes.io/name: qdrant

app.kubernetes.io/instance=qdrant-database
policy:
storageSettings:
requireRegionalStorage: true
failoverSettings:
forceDeleteStrategy: AfterNodeUnreachable
afterNodeUnreachable:
afterNodeUnreachableSeconds: 20 # 60 seconds total
# [END gke_databases_qdrant_01_regional_pd_ha_app]
# [END gke_databases_qdrant_01_regional_pd_ha_app]
2 changes: 1 addition & 1 deletion databases/qdrant/manifests/02-values-file/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ sidecarContainers:
- name: QDRANT_APIKEY
valueFrom:
secretKeyRef:
name: qdrant-apikey
name: qdrant-database-apikey
key: api-key
volumeMounts:
- name: nginx-conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
selector:
matchLabels:
app: qdrant
app.kubernetes.io/instance: qdrant
app.kubernetes.io/instance: qdrant-database
endpoints:
- port: 80
interval: 30s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- name: APIKEY
valueFrom:
secretKeyRef:
name: qdrant-apikey
name: qdrant-database-apikey
key: api-key
volumeMounts:
- name: books-dataset
Expand Down
4 changes: 2 additions & 2 deletions databases/qdrant/manifests/05-rag/chatbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ spec:
- name: APIKEY
valueFrom:
secretKeyRef:
name: qdrant-apikey
name: qdrant-database-apikey
key: api-key
- name: QDRANT_URL
value: http://qdrant:6333
value: http://qdrant-database:6333
- name: STREAMLIT_SERVER_PORT
value: "80"
- name: COLLECTION_NAME
Expand Down
2 changes: 1 addition & 1 deletion databases/qdrant/manifests/05-rag/docs-embedder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
command: ["python", "/app/endpoint.py"]
env:
- name: QDRANT_URL
value: http://qdrant:6333
value: http://qdrant-database:6333
- name: JOB_IMAGE
value: <DOCKER_REPO>/embed-docs:1.0
ports:
Expand Down

0 comments on commit f05935a

Please sign in to comment.