-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWXRestore - Unmanaged Postgres - Override Postgres Secret #1726
Comments
can you elaborate on how this feature would look? |
@fosterseth I was thinking something simple like adding this spec property to AWXRestore as optional. It is expected that the secret specified should be created before deploying the AWXRestore CR. awx-operator/config/crd/bases/awx.ansible.com_awxs.yaml Lines 68 to 70 in fc11db4
When recreating secrets and AWXRestore.spec.postgres_configuration_secret is set, omit secret from backup from being restored. awx-operator/roles/restore/tasks/secrets.yml Lines 81 to 88 in fc11db4
When deploying AWX CR, override AWX.spec.postgres_configuration_secret with AWXRestore.spec.postgres_configuration_secret. awx-operator/roles/restore/tasks/deploy_awx.yml Lines 3 to 12 in fc11db4
I haven't tested the following but it might be a way we can do this: - name: Omit Postgres Configuration Secret
set_fact:
secrets: "{{ secrets | dict2items | difference( secrets.postgresConfigurationSecret | dict2items ) | items2dict }}"
when:
- postgres_configuration_secret | length > 0
- secrets.postgresConfigurationSecret is defined
- name: Override Postgres Configuration Secret
set_fact:
specs: "{{ specs | dict2items | union([{ 'key': 'postgres_configuration_secret', 'value': postgres_configuration_secret }]) | items2dict }}"
when: postgres_configuration_secret | length > 0 |
I believe this is solved with #1862 |
Please confirm the following
Feature Summary
When using AWXRestore it might be useful for unmanaged postgres to use a new database server, database name, etc. Without touching the backup storage maybe there is a way to overwrite the postgres configuration secret.
The text was updated successfully, but these errors were encountered: