apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: postgres-server
  name: postgres-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: postgres-server
  template:
    metadata:
      labels:
        app: postgres-server
    spec:
      containers:
      - image: registry.access.redhat.com/rhscl/postgresql-95-rhel7
        imagePullPolicy: IfNotPresent
        name: postgres-server
        ports:
        - containerPort: 5432
          name: port5432
          protocol: TCP
#        resources:
#          requests:
#            cpu: "1.0"
        env:
        - name: "POSTGRES_HOST_AUTH_METHOD"
          value: "trust"
        - name: "POSTGRESQL_USER"
          value: "admin"
        - name: "POSTGRESQL_PASSWORD"
          value: "admin"
        - name: "POSTGRESQL_DATABASE"
          value: "perfdb"
