apiVersion: v1
kind: Pod
metadata:
  name: postgres-pod
  namespace: voting-app
  labels:
    name: postgres-pod
    app:  demo-voting-app
spec:
  containers:
  - name: postgres
    image: postgres
    imagePullPolicy: IfNotPresent
    env: 
      - name: "POSTGRES_USER"
        value: "postgres"
      - name: "POSTGRES_PASSWORD"
        value: "postgres"
      - name: "POSTGRES_HOST_AUTH_METHOD"
        value: "trust"  

    resources:
      limits:
        memory: "128Mi"
        cpu: "500m"
    ports:
      - containerPort: 5432
