apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres
  labels:
    name: postgre
    app: demo-voting-app
spec:
  replicas: 1
  selector:
    matchLabels:
      name: postgres
      app: demo-voting-app

  template:
    metadata:
      name: postgres
      labels:
        name: postgres
        app: demo-voting-app
      annotations:
        'consul.hashicorp.com/connect-inject': 'true'
        'consul.hashicorp.com/connect-service-upstreams': 'result-app:80'
        
    spec:
      containers:
        - name: postgres
          image: postgres
          ports:
            - containerPort: 5432
          env:
            - name: POSTGRES_USER
              value: "postgres"
            - name: POSTGRES_PASSWORD
              value: "postgres"


          
        
          
