---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: model-trainer
spec:
  replicas: 1
  selector:
    matchLabels:
        app: model-trainer
  template:
    metadata:
      labels:
        app: model-trainer
    spec:
      volumes:
      - name: google-cloud-key
        secret:
          secretName: storage-key
      containers:
      - name: model-trainer
        image: trainer
        volumeMounts:
        - name: google-cloud-key
          mountPath: /var/secrets/google
        env:
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /var/secrets/google/key.json
        - name: GCS_BUCKET
          value: acn-dai-preferences
        imagePullPolicy: IfNotPresent
        #ports:
        #  - containerPort: 8080 # 8080 # 8501
        #resources:
        #  requests:
        #    memory: "400Mi"
        #    cpu: "120m"
          #limits:
          #  memory: "128Mi"
          #  cpu: "250m"
 