apiVersion: apps/v1
kind: Deployment
metadata:
  name: ai-control-chat-ui
  namespace: aegida-services
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ai-control-chat-ui
  template:
    metadata:
      labels:
        app: ai-control-chat-ui
    spec:
      containers:
        - name: app
          image: ai-control-chat-ui:minikube
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 3000
          envFrom:
            - configMapRef:
                name: ai-control-chat-config
            - secretRef:
                name: ai-control-chat-secrets
          startupProbe:
            httpGet:
              path: /api/health
              port: http
            periodSeconds: 5
            timeoutSeconds: 2
            failureThreshold: 36
          readinessProbe:
            httpGet:
              path: /api/health
              port: http
            initialDelaySeconds: 5
            periodSeconds: 5
          livenessProbe:
            httpGet:
              path: /api/health
              port: http
            initialDelaySeconds: 15
            periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
  name: ai-control-chat-ui
  namespace: aegida-services
spec:
  type: ClusterIP
  ports:
    - name: http
      port: 3000
      targetPort: http
  selector:
    app: ai-control-chat-ui
