Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #406 from openchatai/revert-405-feat/helm
Browse files Browse the repository at this point in the history
Revert "Feat/helm"
  • Loading branch information
codebanesr authored Dec 16, 2023
2 parents 77c1596 + 45d18b4 commit a413088
Show file tree
Hide file tree
Showing 54 changed files with 940 additions and 601 deletions.
36 changes: 36 additions & 0 deletions k8s/adminer-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: adminer
name: adminer
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: adminer
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.network/opencopilot-opencopilot-network: "true"
io.kompose.service: adminer
spec:
containers:
- image: adminer
name: adminer
ports:
- containerPort: 8080
hostPort: 8080
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
19 changes: 19 additions & 0 deletions k8s/adminer-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: adminer
name: adminer
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: adminer
status:
loadBalancer: {}
68 changes: 68 additions & 0 deletions k8s/backend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: backend
name: backend
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: backend
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
linkerd.io/inject: enabled
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.network/opencopilot-opencopilot-network: "true"
io.kompose.service: backend
spec:
containers:
- env:
- name: DB_DATABASE
value: opencopilot
- name: DB_HOST
value: mysql.default.svc.cluster.local
- name: DB_PASSWORD
value: dbpass
- name: DB_PORT
value: "3306"
- name: DB_USERNAME
value: dbuser
image: codebanesr/backend:latest
name: backend
ports:
- containerPort: 5000
hostPort: 5000
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /app/shared_data
name: shared-data
# init container for some reason fails to run migrations, but running migrations after execing into the backend container works!!
initContainers:
- name: php-migrations
image: codebanesr/backend:latest
command: ["/bin/sh", "-c"]
args:
- |
php artisan cache:clear
php artisan config:cache
php artisan migrate
php artisan key:generate
php artisan storage:link
restartPolicy: Always
volumes:
- name: shared-data
persistentVolumeClaim:
claimName: shared-data
status: {}
19 changes: 19 additions & 0 deletions k8s/backend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: backend
name: backend
spec:
ports:
- name: "5000"
port: 5000
targetPort: 5000
selector:
io.kompose.service: backend
status:
loadBalancer: {}
30 changes: 30 additions & 0 deletions k8s/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v1
data:
CELERY_BACKEND: redis://redis.default.svc.cluster.local:6379/1
CELERY_BROKER: redis://redis.default.svc.cluster.local:6379/0
COPILOT_MODE: interactive
LANGCHAIN_API_KEY: TOKEN_GOES_HERE
LANGCHAIN_ENDPOINT: https://api.smith.langchain.com
LANGCHAIN_PROJECT: PROJECT_NAME_GOES_HERE
LANGCHAIN_TRACING_V2: "true"
LOCAL_IP: http://host.docker.internal
MONGODB_URL: mongodb://dbuser:dbpass@mongodb.default.svc.cluster.local:27017
MYSQL_URI: mysql+pymysql://dbuser:dbpass@mysql.default.svc.cluster.local:3306/opencopilot
OPENAI_API_KEY: sk-***
OPENAI_API_TYPE: openai
PINECONE_API_KEY: ""
PINECONE_ENV: ""
QDRANT_URL: http://qdrant.default.svc.cluster.local:6333
SCORE_THRESHOLD: "0.91"
SELENIUM_GRID_URL: http://selenium.default.svc.cluster.local:4444/wd/hub
SHARED_FOLDER: /app/shared_data/
STORE: QDRANT
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: llm-server-configmap
name: configmap


# llm-server.default.svc.cluster.local:8002
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-dashboard
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
app: {{ .Release.Name }}-dashboard
io.kompose.service: dashboard
name: dashboard
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-dashboard
io.kompose.service: dashboard
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
linkerd.io/inject: enabled
creationTimestamp: null
labels:
app: {{ .Release.Name }}-dashboard
io.kompose.network/opencopilot-opencopilot-network: "true"
io.kompose.service: dashboard
spec:
containers:
- image: {{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag }}
- image: codebanesr/dashboard:latest
name: dashboard
ports:
- containerPort: 8000
hostPort: 8000
protocol: TCP
envFrom:
- configMapRef:
name: {{ .Release.Name }}-dashboard-configmap
resources: {}
volumeMounts:
- mountPath: /app/shared_data
Expand All @@ -35,3 +42,4 @@ spec:
- name: shared-data
persistentVolumeClaim:
claimName: shared-data
status: {}
19 changes: 19 additions & 0 deletions k8s/dashboard-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert --out=k8s
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: dashboard
name: dashboard
spec:
ports:
- name: "8000"
port: 8000
targetPort: 8000
selector:
io.kompose.service: dashboard
status:
loadBalancer: {}
14 changes: 14 additions & 0 deletions k8s/database-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: database
name: database
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
23 changes: 0 additions & 23 deletions k8s/helm/opencopilot/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions k8s/helm/opencopilot/Chart.yaml

This file was deleted.

Empty file.
62 changes: 0 additions & 62 deletions k8s/helm/opencopilot/templates/_helpers.tpl

This file was deleted.

6 changes: 0 additions & 6 deletions k8s/helm/opencopilot/templates/configmap.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions k8s/helm/opencopilot/templates/dashboard/configmap.yaml

This file was deleted.

Loading

0 comments on commit a413088

Please sign in to comment.