mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 13:52:58 +00:00
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.
15 lines
396 B
Django/Jinja
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'
|