apiVersion: apps/v1
kind: Deployment
metadata:
  name: udagram-api-users
  labels:
    app: udagram
spec:
  replicas: 1
  selector:
    matchLabels:
      app: udagram-api-users
  template:
    metadata:
      labels:
        app: udagram-api-users
    spec:
      containers:
      - name: udagram-api-users
        image: theresmith/udagram_api_user
        # image: ubuntu:groovy
        imagePullPolicy: "Always"
        resources:
          limits:
            cpu: "2"
          requests:
            cpu: "1"
          limits:
            memory: "700Mi"
          requests:
            memory: "100Mi"
        ports:
        - containerPort: 8080
        envFrom:
        - configMapRef:
            name: app-config    
        - secretRef:
            name: app-secret
        env:
        - name: MESSAGE
          value: "hello world"          
        # command: ["tail"]
        # args: ["-f","/dev/null"]         
        # command: ["printenv"]
        # args: ["POSTGRES_HOST", "POSTGRES_USERNAME", "POSTGRES_PASSWORD","MESSAGE"]