apiVersion: apps/v1
kind: Deployment
metadata:
  name: codebank
spec:
  replicas: 1
  selector:
    matchLabels:
      app: codebank
  template:
    metadata:
      labels:
        app: codebank
    spec:
      containers:
      - name: codebank
        image: omurilo/imersao3-codebank:latest
        volumeMounts:
          - name: codebank-volume
            mountPath: /go/src/.env
            subPath: .env
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 50051

      volumes:
        - name: codebank-volume
          configMap:
            name: codebank-conf
            items:
              - key: env
                path: .env

