This commit is contained in:
nold 2024-06-30 14:59:23 +02:00
parent 2b56812dcf
commit 30284314c0
6 changed files with 235 additions and 31 deletions

View file

@ -34,27 +34,3 @@ apps:
repo: bjw-s
chart: app-template
targetRevision: 2.4.0
# - name: qdrant
# repoURL: https://qdrant.to/helm
# chart: qdrant
# targetRevision: 0.9.1
- name: bibot
namespace: bibot
repo: bjw-s
chart: app-template
targetRevision: 3.2.1
secrets:
- name: bibot
keys:
- discord-token
- ombi-api-key
- prompt-template
- instruct-template
- OPENWEATHERMAP_API_KEY
ignoreDiff:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas

View file

@ -2,7 +2,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: bi-cluster
namespace: bibot
namespace: bi
spec:
kafka:
version: 3.7.0
@ -44,7 +44,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: bi-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
@ -58,7 +58,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: bi-output
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
@ -72,11 +72,11 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: agent-registry
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
partitions: 1
partitions: 24
replicas: 1
config:
retention.ms: 7200000
@ -86,7 +86,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: agent-main-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
@ -100,7 +100,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: discord-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:

View file

@ -0,0 +1,26 @@
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: bi-mongo
namespace: bi
spec:
members: 1
type: ReplicaSet
version: "6.0.5"
security:
authentication:
modes: ["SCRAM"]
users:
- name: admin
db: admin
passwordSecretRef:
name: bi-mongo-password
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
scramCredentialsSecretName: bi
additionalMongodConfig:
storage.wiredTiger.engineConfig.journalCompressor: zlib

33
projects/bi/project.yaml Normal file
View file

@ -0,0 +1,33 @@
config:
description: Bi Agent Framework
apps:
- name: bi
namespace: bi
repo: bjw-s
chart: app-template
targetRevision: 3.2.1
secrets:
- name: bibot
keys:
- discord-token
- ombi-api-key
- prompt-template
- instruct-template
- OPENWEATHERMAP_API_KEY
ignoreDiff:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
- name: mongo-express
repoURL: https://cowboysysop.github.io/charts/
chart: mongo-express
targetRevision: 6.5.2
secrets:
- name: mongo-express
keys:
- mongodb-admin-password
- site-cookie-secret
- site-session-secret

119
projects/bi/values/bi.yml Normal file
View file

@ -0,0 +1,119 @@
controllers:
# main agent
main:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always
env:
BIBOT_CONFIG: /config/bibot.yml
BIBOT_KAFKA__BROKER: kafka://bi-cluster-kafka-bootstrap:9092
BIBOT_MONGODB__URI: mongodb://bi-mongo-svc:27017/
BIBOT_MONGODB__USER:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: username
BIBOT_MONGODB__PASSWORD:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: password
PHOENIX_COLLECTOR_ENDPOINT: http://phoenix.phoenix.svc.cluster.local:6006
PHOENIX_PROJECT_NAME: bi
command: ["python3"]
args: ["/app/bi/agents/main/app.py", "worker", "-l", "info"]
controller:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always
env:
BIBOT_CONFIG: /config/bibot.yml
BIBOT_KAFKA__BROKER: kafka://bi-cluster-kafka-bootstrap:9092
BIBOT_MONGODB__URI: mongodb://bi-mongo-svc:27017/
BIBOT_MONGODB__USER:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: username
BIBOT_MONGODB__PASSWORD:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: password
command: ["python3"]
args: ["/app/bi/controller.py", "worker", "-l", "info"]
discord:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always
command: ["python3"]
args: ["/app/bi/connectors/discord/app.py", "worker", "-l", "info"]
env:
BIBOT_KAFKA__BROKER: bi-cluster-kafka-bootstrap:9092
BIBOT_MONGODB__URI: mongodb://bi-mongo-svc:27017/
BIBOT_MONGODB__USER:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: username
BIBOT_MONGODB__PASSWORD:
valueFrom:
secretKeyRef:
name: bi-mongo-admin-admin
key: password
OPENAI_API_KEY: fake
BIBOT_DISCORD__TOKEN:
valueFrom:
secretKeyRef:
name: bibot
key: discord-token
## Prod:
BIBOT_DISCORD__CHANNELS: "1216440541064200192"
# Dev:
# BIBOT_DISCORD_CHANNELS: "1217418069693960223"
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
persistence:
secret:
name: bibot
enabled: true
type: secret
config:
name: bibot-config
enabled: true
type: configMap
data:
size: 10Gi
type: persistentVolumeClaim
accessMode: ReadWriteOnce
# service:
# main:
# controller: main
# ports:
# http:
# port: 8000
# type: ClusterIP

View file

@ -0,0 +1,50 @@
ingress:
enabled: true
ingressClassName: "ingress-internal"
pathType: ImplementationSpecific
annotations:
cert-manager.io/cluster-issuer: vault-issuer
hosts:
- host: mongo.dc
paths:
- /
tls:
- secretName: mongo-express-tls
hosts:
- mongo.dc
## @param mongodbServer MongoDB host name or IP address
mongodbServer: bi-mongo-svc.bi.svc.cluster.local
## @param mongodbPort MongoDB port
mongodbPort: 27017
## @param mongodbEnableAdmin Enable administrator access
mongodbEnableAdmin: true
## @param mongodbAdminUsername Administrator username
mongodbAdminUsername: admin
## @param mongodbAdminPassword Administrator password
# mongodbAdminPassword: ""
## @param siteBaseUrl Set the express baseUrl to ease mounting at a subdirectory
siteBaseUrl: /
## @param basicAuthUsername Mongo Express web login name
basicAuthUsername: ""
## @param basicAuthPassword Mongo Express web login password
basicAuthPassword: ""
## @param existingSecret Name of existing Secret to use
existingSecret: "mongo-express"
## @param existingSecretKeyMongodbAdminPassword Key in existing Secret that contains administrator password
# existingSecretKeyMongodbAdminPassword: bi-mongo-admin-admin
## @param existingSecretKeyMongodbAuthPassword Key in existing Secret that contains database password
# existingSecretKeyMongodbAuthPassword: bi-mongo-admin-admin