apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: backend
  name: backend
spec:
  replicas: 1
  selector:
    matchLabels:
      name: pod-backend
  template:
    metadata:
      labels:
        name: pod-backend
      name: backend
    spec:
      containers:
      - image: localhost:5000/backend
        name: backend
        ports:
        - containerPort: 8000
        imagePullPolicy: IfNotPresent
        env:
        - name: BOOTSTRAP_SERVERS
          value: kafka-cluster:9092
        - name: CONTROL_TOPIC
          value: control
        - name: TRAINING_MODEL_IMAGE
          value: localhost:5000/model_training
        - name: DISTRIBUTED_TRAINING_MODEL_IMAGE
          value: localhost:5000/distributed_model_training
        - name: INFERENCE_MODEL_IMAGE
          value: localhost:5000/model_inference
        - name: FRONTEND_URL
          value: http://localhost
        - name: BACKEND_URL
          value: http://backend:8000
        - name: ALLOWED_HOSTS
          value: 127.0.0.1,localhost,backend
        # - name: KUBE_TOKEN
        #  value: ...
        # - name: KUBE_HOST
        #  value: https://...
        # - name: SECRET_KEY
        #  value: ...
        # - name: DEBUG
        #  value: 0
