apiVersion: apps/v1
kind: Deployment
metadata:
  name: product-api
  labels:
    app: product-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: product-api
  template:
    metadata:
      labels:
        app: product-api
      # annotations:
        # "consul.hashicorp.com/connect-inject": "true"
        # "consul.hashicorp.com/connect-service": "product-api"
    spec:
      containers:
      - name: product-api
        image: "jubican/javaperks-product-api:1.1.7"
        imagePullPolicy: Always
        ports:
        - containerPort: 5821
        env:
          - name: LOCALHOST_ONLY
            value: "false"
          - name: AWS_REGION
            valueFrom:
              configMapKeyRef:
                name: env-values
                key: aws-region
          - name: DDB_TABLE_NAME
            valueFrom:
              configMapKeyRef:
                name: env-values
                key: table-product
        # livenessProbe:
        #   httpGet:
        #     path: /_health_check
        #     port: 5822
        #   initialDelaySeconds: 10
        #   periodSeconds: 30
        resources:
          limits:
            cpu: 300m
          requests:
            cpu: 100m
            memory: 100Mi
