Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add milvus vector db deployment #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions yaml/milvus-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: milvus-standalone
spec:
replicas: 1
selector:
matchLabels:
app: milvus
template:
metadata:
labels:
app: milvus
spec:
containers:
- name: milvus-standalone
image: milvusdb/milvus:v2.4.16
command: ["milvus", "run", "standalone"]
env:
- name: ETCD_USE_EMBED
value: "true"
- name: ETCD_DATA_DIR
value: "/var/lib/milvus/etcd"
- name: ETCD_CONFIG_PATH
value: "/milvus/configs/embedEtcd.yaml"
- name: COMMON_STORAGETYPE
value: "local"
resources:
limits:
memory: "16Gi"
cpu: "4"
requests:
memory: "4Gi"
cpu: "2"
ports:
- containerPort: 19530
- containerPort: 9093
- containerPort: 2379
volumeMounts:
- name: milvus-volume
mountPath: /var/lib/milvus
- name: config-embedetcd
mountPath: /milvus/configs/embedEtcd.yaml
subPath: embedEtcd.yaml
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumes:
# - name: milvus-volume
# emptyDir: {}
- name: milvus-volume
persistentVolumeClaim:
claimName: milvus-data-pvc

- name: config-embedetcd
configMap:
name: embedetcd-config

---
apiVersion: v1
kind: ConfigMap
metadata:
name: embedetcd-config
data:
embedEtcd.yaml: |
listen-client-urls: http://0.0.0.0:2379
advertise-client-urls: http://0.0.0.0:2379
quota-backend-bytes: 4294967296
auto-compaction-mode: revision
auto-compaction-retention: '1000'

---
apiVersion: v1
kind: Service
metadata:
name: milvus-service
spec:
selector:
app: milvus
ports:
- name: grpc
protocol: TCP
port: 19530
targetPort: 19530
- name: etcd
protocol: TCP
port: 2379
targetPort: 2379
type: LoadBalancer

---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: milvus-route
spec:
to:
kind: Service
name: milvus-service
port:
targetPort: http