# Postgres Secret.
---
apiVersion: v1
kind: Secret
metadata:
  name: '{{ ansible_operator_meta.name }}-postgres-configuration'
  namespace: '{{ ansible_operator_meta.namespace }}'
stringData:
  password: '{{ lookup('password', '/tmp/p' + ansible_operator_meta.name + 'pg length=32 chars=ascii_letters,digits') }}'
  username: '{{ deployment_type }}'
  database: '{{ deployment_type }}'
  port: '5432'
  host: {{ ansible_operator_meta.name }}-postgres-svc
  sslmode: {{ postgres_sslmode | default('prefer') }}
  type: 'managed'
