Christian Adams
1b41d945e6
Check if image_pull_secrets variable is defined ( #865 )
...
* Do not attempt to backup secret if none are defined
2022-04-11 11:10:09 -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
Christian Adams
5f76d4917e
Enable setting a list of image_pull_secrets ( #860 )
...
When there are e.g. multiple authenticated container registries used
we need to be able to add multiple imagePullSecrets to the k8s resource
Co-authored-by: Maximilian Meister <maximilian.meister@pm.me >
2022-04-05 11:51:21 -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
69203723ef
Update scaffolding to pass yamllint
2021-09-29 18:39:24 -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
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
Christian M. Adams
cf2cd14154
Do not check for default ee-pull-cred secret
...
* fix nested var ref for awx_spec.spec
2021-07-01 15:05:18 -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
Christian M. Adams
f5c8b33b40
Backup ingress, bundle & ee pull secrets
2021-06-24 13:50:49 -04:00
Julen Landa Alustiza
68aaf1db79
Explicitly nullify ownerReference on operator created backup pvc
...
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com >
2021-06-24 14:58:18 +02:00
Yanis Guenane
ad036c2e65
awx-cro.yml: Remove extra space
...
Fixes: https://github.com/ansible/awx-operator/issues/410
2021-06-18 09:54:49 +02:00
Yanis Guenane
7c02eabbdf
Merge pull request #404 from Spredzy/restore_colon
...
backup: Ensure colon are preserved in awx spec
2021-06-16 15:26:02 +02:00
Yanis Guenane
3398cc2f01
backup: Ensure colon are preserved in awx spec
...
Due to the way the command is run, the field with a colon in it will
generate a broken yaml serialization. This commit aims to keep it
accurate.
2021-06-16 14:17:11 +02: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
e857902dcc
Fail task if pg_dump command fails
2021-06-04 10:31:57 -04:00
Christian M. Adams
da75e4b400
update name of default postgres label selector for backup role
2021-06-01 17:12:23 -04:00
Yanis Guenane
75458d0678
Do not prepend variables name with tower_
2021-05-25 09:52:13 +02: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
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
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
cdbaf9460e
Remove unnecessary intermediate awx_spec var
2021-04-30 10:49:32 -04:00
Christian M. Adams
5ae36367a4
Rename product specific variable names
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
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
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
8ed0b1fe61
Template only what is needed from secrets and awx cro
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
Christian M. Adams
0580398c90
Finish db restore logic
...
- rename _backup_dir to backup_dir
- add towerBackupClaim status to make the pvc name easier to find for users
2021-04-30 10:24:36 -04:00
Christian M. Adams
8467209d35
init restore
2021-04-30 10:24:35 -04:00
Christian M. Adams
80c8d87f71
Create an event when pvc is not set to alert the user
2021-04-30 10:24:35 -04:00
Christian M. Adams
e1dca00f46
Fix backup reconciliation loop, add error status
2021-04-30 10:24:35 -04:00