apiVersion: apps/v1
kind: Deployment
metadata:
  name: model-manager
  labels:
    app: model-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: model-manager
  template:
    metadata:
      labels:
        app: model-manager
    spec:
      containers:
      - name: model-manager
        image: itselavia/edge-platform-model-manager
        ports:
        - containerPort: 8000
        envFrom:
        - configMapRef:
            name: model-manager-env
        volumeMounts:
        - name: cloudsql-volume
          mountPath: "/etc/credentials"
          readOnly: true
      volumes:
      - name: cloudsql-volume
        secret:
          secretName: cloudsql-oauth-credentials
          items:
          - key: creds
            path: cloudsql-oauth-credentials.json
      nodeSelector:
        type: worker
      dnsPolicy: Default
      serviceAccount: model-manager