Commit Graph
36 Commits
Author SHA1 Message Date
Ricardo Carrillo Cruz 24cb6006f6 Grant postgres to awx user on migrate_data (#2038)
This is needed in case customers move to
operator platform.

Fixes https://issues.redhat.com/browse/AAP-41592
2025-04-24 09:58:48 +02:00
mihirlele 70ec7a5304 Add ability to exclude postgres data during migration to Openshift AAP operator (#1954) 2024-09-20 03:23:39 +00:00
Christian Adams 4c5429190c Timeout stream keep alive for Upgrades and Restores (#1542)
Signed-off-by: Christian M. Adams <[email protected]>
2023-08-29 15:36:48 -04:00
Christian Adams 7012a6acfc Modify how pg password is set in postgres pod (#1540)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m50s
CI / molecule (-t replicas) (push) Failing after 2m18s
CI / helm (push) Failing after 3m39s
CI / no-log (push) Successful in 16s
Signed-off-by: Christian M. Adams <[email protected]>
2023-08-29 15:28:54 +00:00
Christian Adams 1dc64b551c Add keepalive to migrate data script (#1538)
Signed-off-by: Christian M. Adams <[email protected]>
2023-08-29 11:05:11 -04:00
Christian Adams 87b0511997 Use new postgres pod label when migrating from old instance (#1005) 2022-07-29 16:38:04 -04:00
Christian AdamsandDimitri Savineau fde4a47a14 Bump dependencies stream (#841)
* Bump Postgresql, Nginx and Redis versions
* pg12 --> pg13 upgrade path
* Set supported pg version as a variable to remain DRY
* Make deleting the old db data pvc after upgrade configurable
* Use labels to find the postgres pod

* backup/restore: fix postgres label selector value

We need to use the deployment_name variable for the postgres instance
name.

Signed-off-by: Dimitri Savineau <[email protected]>

* backup/restore: add missing default supported_pg_version variable

Signed-off-by: Dimitri Savineau <[email protected]>

* restore: update database_host fact with pg suffix

Signed-off-by: Dimitri Savineau <[email protected]>

Co-authored-by: Dimitri Savineau <[email protected]>
2022-07-29 13:21:51 -04:00
David Luong e966e9299f Resolves #918 to make no_log configurable (#923) 2022-06-16 01:03:13 -04:00
Christian Adams 575e594314 Wait for the postgres pod to enter the ready state before starting containers (#861) 2022-04-06 08:29:53 -04:00
kurokobo 589a3751e1 fix: add quotes for PGPASSWORD for the backup and restore roles 2022-03-20 16:13:12 +09:00
Shane McDonald e97def4429 meta -> ansible_operator_meta 2021-09-29 18:39:24 -04:00
Christian M. Adams 68b00efe5e Set no_log on all tasks that could leak secrets in logs 2021-07-07 18:19:31 -04:00
Christian M. Adams 406bbf90fa Make postgres sts labels consistent with k8s recommendations & pulp-operator
- k8s recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
2021-05-18 10:02:15 -04:00
Christian M. Adams 9145b32d11 Use custom archive format when migrating data
- this approach is compatible with the RH postgresql container
2021-05-07 15:04:20 -04:00
Christian M. Adams 867bc258b9 Allow custom postgres pod label to support user managed pg pods
- Only set resolvable pg host path for pg container when managed
2021-04-30 10:49:30 -04:00
Christian M. Adams 38a6a02f85 Add secret names as statuses on the AWX object
- set migrate data status even if custom name for old postgres config is not used
 - Allow users to change pg name, pw & db name for a managed postgres
 - set default value for postgres-configuration type as unmanaged if secret is created
 - Make pg port configurable for managed deployments
2021-04-30 10:49:27 -04:00
Christian M. Adams 8f760e2842 Allow users to change pg name, pw & db name for a managed postgres
- set default value for postgres-configuration type as unmanaged if secret is created
2021-04-30 10:32:05 -04:00
Christian M. Adams 2cbf60fa17 Remove unneeded fqcn for modules & fix CI 2021-04-30 10:24:36 -04:00
Christian M. Adams b9d0852c83 Fix small namespace issue 2021-04-30 10:24:36 -04:00
Christian M. Adams 8422f6fbd9 rename db task vars with awx instead of tower for consistency 2021-04-30 10:24:35 -04:00
Marcelo Moreira de Mello 3d5a9eae31 Handle statefulset updates 2021-04-27 17:16:57 -04:00
Marcelo Moreira de Mello 46fca2af5a updated 2021-04-21 15:41:18 -04:00
Marcelo Moreira de Mello 597356f317 Handles deleting and recreating statefulset and deployment when needed 2021-04-21 14:58:21 -04:00
Marcelo Moreira de Mello 39ef816f5e Updated logic to avoid crash during upgrades 2021-04-19 23:19:13 -04:00
Christian M. Adams 43aa01ce5f Fix data migrations when the database names do not match 2021-04-05 17:14:47 -04:00
Marcelo Moreira de Mello 185238c199 Use k8s labels on managed resources 2021-04-01 14:04:59 -04:00
Christian M. Adams 746dc2738f Name pg pod in a more unique way
- this is to make it possible to run migration with multiple deployments in the same pod
2021-03-24 13:37:39 -04:00
Shane McDonald 7d6743c44d Fix linter 2021-03-18 13:58:26 -04:00
Shane McDonald 94a4861d13 Bulk removal of no_log statements
The operator would be impossible to debug with these
2021-03-18 11:22:04 -04:00
Shane McDonald da26472a03 Fix reconcilation loop after data migration changes 2021-03-18 11:22:00 -04:00
Christian M. Adams c22577bc80 Make data migration idempotent 2021-03-17 16:03:46 -04:00
Christian M. Adams e83e54419a Add no_log where needed, scale down pods before migration 2021-03-16 13:32:16 -04:00
Christian M. Adams 5b89c5c433 Clean db on Tower data is restored to 2021-03-16 13:32:15 -04:00
Christian M. Adams 0e1b12f4b1 Data migration from 3.8 to 4.0 via pg_dump streamed to psql 2021-03-16 13:32:15 -04:00
Christian M. Adams 93d53c712c Use k8s_exec tasks 2021-03-16 13:32:15 -04:00
Christian M. Adams 6a5bdaf2f7 init backup & restore 2021-03-16 13:32:15 -04:00