Files
awx-operator/roles/installer/templates/tower_postgres_secret.yaml.j2
Yanis Guenane e5f1041350 PostgreSQL: Allow one to provide her own db configuration secret
If a user provide its own secret by using the
`tower_postgres_configuration_secret` use this variable, else try to use
`<instance>-postgres-configuration` secret. Else create one and use a
local database.
2021-02-08 15:13:56 +01:00

15 lines
396 B
Django/Jinja

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