apiVersion: apps/v1
kind: Deployment
metadata:
  name: rag-on-edge-cerebral
  namespace: cerebral
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rag-on-edge-cerebral
  template:
    metadata:
      labels:
        app: rag-on-edge-cerebral
    spec:
      containers:
      - name: rag-on-edge-cerebral
        image: agoraarmbladev.azurecr.io/rag-on-edge-cerebral:1.6
        ports:
        - containerPort: 5000
        env:
        - name: AZURE_OPENAI_API_KEY
          value: "<YOUR_OPENAI>"
        - name: CHATGPT_MODEL
          value: "gpt-35-turbo"
        - name: AZURE_OPENAI_ENDPOINT
          value: "<AZURE OPEN AI ENDPOINT>"
        - name: OPENAI_API_VERSION
          value: "2024-03-01-preview"
        - name: INFLUXDB_URL
          value: "http://influxdb.cerebral.svc.cluster.local:8086"
        - name: INFLUXDB_BUCKET
          value: "manufacturing"
        - name: INFLUXDB_TOKEN
          value: "secret-token"
        - name: INFLUXDB_ORG
          value: "InfluxData"
        - name: REDIS_URL
          value: "redis://redis-service.cerebral.svc.cluster.local:6379"
---
apiVersion: v1
kind: Service
metadata:
  name: rag-on-edge-cerebral-service
  namespace: cerebral
spec:
  type: LoadBalancer
  ports:
  - port: 5000
    targetPort: 5000
    protocol: TCP
  selector:
    app: rag-on-edge-cerebral

