apiVersion: apps/v1
kind: Deployment
metadata:
  name: result-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: result
  template:
    metadata:
      labels:
        app: result
    spec:
      containers:
      - name: result
        image: docker.pkg.github.com/sam-atkins/voting-app/result:0.3.0
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 80
        env:
          - name: PGUSER
            value: postgres
          - name: PGHOST
            value: postgres-store-cluster-ip-service
          - name: PGPORT
            value: "5432"
          - name: PGDATABASE
            value: postgres
            # TODO: this is for dev only, change to use a secret
          - name: PGPASSWORD
            value: postgres
      imagePullSecrets:
        - name: dockerconfigjson-github-com
