Initial commit
This commit is contained in:
32
k8s/admin-ui/deployment.yaml
Normal file
32
k8s/admin-ui/deployment.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: admin-ui
|
||||
namespace: vector-store
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: admin-ui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: admin-ui
|
||||
spec:
|
||||
containers:
|
||||
- name: admin-ui
|
||||
image: harbor.cosair.de/litellm/vector-store-admin
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: API_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: vector-store-config
|
||||
key: API_URL
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
11
k8s/admin-ui/service.yaml
Normal file
11
k8s/admin-ui/service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: admin-ui
|
||||
namespace: vector-store
|
||||
spec:
|
||||
selector:
|
||||
app: admin-ui
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
10
k8s/configmap.yaml
Normal file
10
k8s/configmap.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: vector-store-config
|
||||
namespace: vector-store
|
||||
data:
|
||||
LITELLM_PROXY_URL: "https://llmproxy.cosiar.de"
|
||||
ADMIN_USER_IDS: "default_user_id"
|
||||
API_URL: "https://api.vector.cosair.de"
|
||||
EMBEDDING_MODEL: "cosair/multilingual-e5-large-instruct"
|
||||
33
k8s/ingress-api.yaml
Normal file
33
k8s/ingress-api.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: vector-api-ingress
|
||||
namespace: vector-store
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||
nginx.ingress.kubernetes.io/cors-allow-origin: "https://admin.vector.cosair.de"
|
||||
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
|
||||
nginx.ingress.kubernetes.io/cors-allow-headers: "Authorization, Content-Type"
|
||||
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "256m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
|
||||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- api.vector.cosair.de
|
||||
secretName: vector-api-tls
|
||||
rules:
|
||||
- host: api.vector.cosair.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: vector-api
|
||||
port:
|
||||
number: 8000
|
||||
24
k8s/ingress-ui.yaml
Normal file
24
k8s/ingress-ui.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: admin-ui-ingress
|
||||
namespace: vector-store
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- admin.vector.cosair.de
|
||||
secretName: admin-ui-tls
|
||||
rules:
|
||||
- host: admin.vector.cosair.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: admin-ui
|
||||
port:
|
||||
number: 80
|
||||
4
k8s/namespace.yaml
Normal file
4
k8s/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: vector-store
|
||||
9
k8s/secrets.yaml
Normal file
9
k8s/secrets.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: vector-api-secrets
|
||||
namespace: vector-store
|
||||
type: Opaque
|
||||
stringData:
|
||||
LITELLM_MASTER_KEY: "sk-master-key"
|
||||
DATABASE_URL: "postgresql://vecuser:vecpass@postgres:5432/vectordb"
|
||||
64
k8s/vector-api/deployment.yaml
Normal file
64
k8s/vector-api/deployment.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: vector-api
|
||||
namespace: vector-store
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vector-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vector-api
|
||||
spec:
|
||||
containers:
|
||||
- name: vector-api
|
||||
image: your-registry/vector-store-api:1.0.0
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vector-api-secrets
|
||||
key: DATABASE_URL
|
||||
|
||||
- name: LITELLM_MASTER_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vector-api-secrets
|
||||
key: LITELLM_MASTER_KEY
|
||||
|
||||
- name: LITELLM_PROXY_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: vector-store-config
|
||||
key: LITELLM_PROXY_URL
|
||||
|
||||
- name: ADMIN_USER_IDS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: vector-store-config
|
||||
key: ADMIN_USER_IDS
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 15
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
11
k8s/vector-api/service.yaml
Normal file
11
k8s/vector-api/service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: vector-api
|
||||
namespace: vector-store
|
||||
spec:
|
||||
selector:
|
||||
app: vector-api
|
||||
ports:
|
||||
- port: 8000
|
||||
targetPort: 8000
|
||||
Reference in New Issue
Block a user