---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres
  namespace: default
  annotations:
    kubernetes.io/change-cause: Creation
    reloader.stakater.com/auto: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: postgres
  template:
    metadata:
      labels:
        app: postgres
    spec:
      automountServiceAccountToken: false
      containers:
      - name: bdd
        image: postgres:12.5-alpine
        ports:
        - containerPort: 5432
          name: tcp
        env:
        - name: POSTGRES_PASSWORD
          value: password
        - name: POSTGRES_DB
          value: mydb  
        resources:
          requests:
            memory: "100Mi"
            cpu: "200m"
          limits:
            memory: "150Mi"
            cpu: "300m"
      restartPolicy: Always