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
Yanis Guenane
fc713e7b73
Properly apply default when env lookup returns empty
2021-11-02 09:57:04 +01:00
Christian M. Adams
7eb6d0e0f5
Set default images, but use them as a last resort
...
* Only use them if user did not set an image, or RELATED_IMAGES_ var
is not set
Signed-off-by: Christian M. Adams <chadams@redhat.com >
(cherry picked from commit bb957be9e6 )
2021-11-01 14:58:24 +01:00
Christian M. Adams
29879f7064
Rename related image vars to be distinct across operators
2021-10-27 11:26:51 -04:00
Christian M. Adams
8aee279634
Use relatedImages to make disconnected deployments possible
...
* Add ability to pass images in from the CSV for disconnected installs
Signed-off-by: Christian M. Adams <chadams@redhat.com >
2021-10-26 00:26:16 -04:00
Shane McDonald
8b64670146
Work around bug in k8s module with the "template" attribute
2021-09-29 20:24:00 -04: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
Yanis Guenane
adbdf82aa3
Merge pull request #450 from Zokormazo/secrets
...
Backup and restore secret type
2021-07-02 14:05:17 +02:00
Julen Landa Alustiza
663c009cf4
Backup and restore secret type
...
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com >
2021-07-02 13:07:44 +02:00
Julen Landa Alustiza
c1b29505d9
Remove ownerReference on restored secrets
...
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com >
2021-07-02 11:44:12 +02:00
Christian M. Adams
b79ab92714
Use restore namespace as default if none provided
2021-07-01 11:26:53 -04:00
Christian M. Adams
8b2bfa7380
Fix var so that generated secret names are added to spec backup
2021-06-30 10:57:42 -04:00
Christian M. Adams
6b01ada12b
preserve newlines in AWX spec
2021-06-28 17:39:01 -04:00
Shane McDonald
0ea9a04028
Preserve newlines when restored secrets contain newlines
2021-06-23 19:57:44 -04:00
Shane McDonald
7310b43a5c
Use kubernetes.core
2021-06-22 14:52:54 -04:00
Christian M. Adams
bfec61ad8d
Dynamically collect secrets for backup & restore roles
...
- This prevents us from overwriting vars unintentionally at restore time
- This will make it easier to add secrets to be backed up in the future
- Add generated secret names to awx spec backup
- Fail early if secret status doesn't exist
- Skip if secret is not in spec for non-generated secrets
- Secret values must be b64 decoded before secret is created
- Cleanup temp files
2021-06-15 14:17:02 -04:00
Christian M. Adams
69b3f43414
Make postgres image and version separately configurable for backup/restore
...
- Update templated and generated manifest files
2021-06-04 11:00:50 -04:00
Yanis Guenane
75458d0678
Do not prepend variables name with tower_
2021-05-25 09:52:13 +02:00
Christian Adams
e18ce59ea9
Merge pull request #297 from rooftopcellist/pg-labels
...
Make postgres sts labels consistent with k8s recommendations & pulp-operator
2021-05-18 10:37:46 -04:00
Christian Adams
5fd86e07ce
Merge pull request #319 from rooftopcellist/custom_format_backup
...
Use custom pg_dump format for faster restores
2021-05-18 10:33:23 -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
Marcelo Moreira de Mello
08776ca2b6
Extended labels to AWX Backup/Restore
2021-05-17 21:40:37 -04:00
Christian M. Adams
f16d9ac55f
Use custom pg_dump format for faster restores
2021-05-17 16:54:49 -04:00
Christian M. Adams
ca8127448e
Scale down the new deployment before restoring
2021-05-07 11:18:40 -04:00
Christian Adams
e082180cf9
Merge pull request #293 from Zokormazo/restore-kind
...
Restore: set proper kind var after deploying AWX CR
2021-05-07 09:23:02 -04:00
Julen Landa Alustiza
fc4687ff77
Restore: set proper kind var after deploying AWX CR
...
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com >
2021-05-07 13:31:29 +02:00
Christian M. Adams
c551d05182
Fix file permissions for tmp spec vars file
2021-05-05 09:35:03 -04:00
Christian M. Adams
9532cc754e
Use copy module, not shell
2021-05-04 14:28:59 -04:00
Christian M. Adams
15bc12b7f6
Remove ownerReferences based on secret name from backup
2021-05-04 11:46:09 -04:00
Christian M. Adams
8af0681373
Persist secret names from old deployment & add them to the spec
...
- renamed some more variables to be consistent with the pulp-operator
- removed unneeded vars from backup & restore crds
- added a way to parse spec at restore time by including vars to
get around the issue of triply nested quotes when using to_json
2021-05-04 10:06:29 -04:00
Christian M. Adams
5e2d11835e
Fix rebase issue & remove dynamic kind/version var setting
2021-04-30 13:51:48 -04:00
Christian M. Adams
36852cd5f5
remove unused variables in restore role
2021-04-30 10:49:32 -04:00
Christian M. Adams
b5c5a1722d
revert unneccesary admin password update
2021-04-30 10:49:31 -04:00
Christian M. Adams
5ae36367a4
Rename product specific variable names
2021-04-30 10:49:31 -04:00
Christian M. Adams
d743936ee4
Update admin user password with value in provided/generated secret
2021-04-30 10:49:31 -04:00
Christian M. Adams
c817a2234d
Simplify vars needed for restore CR & do not garbage collect secrets
2021-04-30 10:49:31 -04:00
Christian M. Adams
57f9530198
Simplify pvc naming scheme, one pvc per deployment
2021-04-30 10:49:31 -04:00
Christian M. Adams
3e444da7bc
Set ownerRef to null for restore created AWX object to avoid garbage collection
...
- Set defaults for pg type to satisfy conditional
2021-04-30 10:49:30 -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
ff9248e971
create pvc in namespace of old awx by default, update docs, fix bug with secret statuses
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
5b32c41277
Fix retry for checking postgres pod & fix secrets template
...
- fixed a lot of typos & updated the README.md files
2021-04-30 10:24:37 -04:00
Christian M. Adams
fb612c24df
Only write values for spec section of awx object in backup
2021-04-30 10:24:37 -04:00
Christian M. Adams
82efe05343
store secrets & definitions in a tempfile dir, fix postgres label
2021-04-30 10:24:36 -04:00
Christian M. Adams
2cbf60fa17
Remove unneeded fqcn for modules & fix CI
2021-04-30 10:24:36 -04:00
Christian M. Adams
ce8c58f542
added secrets logic, fixed permissions issues
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
5669747bbf
Scope pvc and management pod to default namespace
...
- make this configurable via tower_backup_pvc_namespace var
- remove redundant k8s task info
2021-04-30 10:24:36 -04:00