David Luong
61ef5ef005
change date format to avoid :
2023-03-02 13:54:00 -05:00
Stanislav Zaprudskiy
f042cb3d00
Fix lint warnings
2023-02-07 16:31:26 +01:00
Stanislav Zaprudskiy
5a856eeba8
Add additional_labels parameter ( #1160 )
...
* Move label templates into `common` role
So that there is single source of labels management, and labels are
unified across the other roles
* Introduce `additional_labels`
* Fix paths for labels templates
* Return `additional_labels_items` as list
* Add molecule tests
2023-01-30 18:51:08 -05:00
Joel
ab566c2530
backup role use k8s_cp module to write files ( #1111 )
2023-01-24 17:02:05 -05:00
Mathijsvw
4ee523ed69
Added pg_dump_suffix doc and crd property ( #1006 )
...
* Added pg_dump_suffix crd property
Signed-off-by: Mathijs van Willigen <mathijs.vanwilligen@student.hu.nl >
2022-12-14 14:56:40 -05:00
Christian Adams
a5e21b56ae
Backup and restore receptor tls secret with expected generated name ( #1107 )
2022-11-07 11:04:22 -05:00
Christian Adams
6b01ff09ce
Amend permissions for backup dir ( #1109 )
2022-11-03 12:52:48 -04:00
Christian M. Adams
d3ca9c57c9
One more no_log default update
2022-10-04 11:36:56 -04:00
Jeremy White
a81be586db
update filter to jinja 3.x format
2022-08-24 14:56:08 -05:00
Christian Adams
9f017d03e6
Make Backup & restore requests and limits configurable ( #1030 )
...
* Add resource specification options to the backup objects
* Add resource specification options to the restore object
Co-authored-by: Ivan Aragonés <26822043+ivarmu@users.noreply.github.com >
Co-authored-by: silvinux <silvinux7@gmail.com >
Co-authored-by: Ivan Aragonés Muniesa <iaragone@redhat.com >
2022-08-23 23:23:01 -04:00
kurokobo
f1df88dc53
fix: change to safely skip task if backupDirectory is not defined ( #1003 ) ( #1004 )
2022-08-04 10:42:43 -04:00
Christian Adams
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 <dsavinea@redhat.com >
* backup/restore: add missing default supported_pg_version variable
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com >
* restore: update database_host fact with pg suffix
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com >
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com >
2022-07-29 13:21:51 -04:00
Shane McDonald
0be17476cd
Merge pull request #979 from stanislav-zaprudskiy/allow_skipping_labels_patching_on_awx_resource
...
Introduce `set_self_labels` in CRDs
2022-07-20 12:41:20 -04:00
Christian Adams
b3037c1067
Deprecate the backup_pvc_namespace field ( #988 )
...
- Removes backup_pvc_namespace field from OLM forms
- This field has created confusion for users and there is no strong
case for needing this functionality
- Users will still be able to add it to the yaml for the CR if they
want to use it with the cluster-scoped AWX operator
- Remove unneeded advanced descriptors to avoid empty Advanced
configuration expander
fixes AAP-1176
2022-07-18 17:35:11 -04:00
Stanislav Zaprudskiy
36355b6a15
Introduce set_self_labels in CRDs
...
To allow skipping labels maintenance on CRs processed by the operator.
Resolves https://github.com/ansible/awx-operator/issues/756
2022-07-12 10:48:16 +02:00
Stefan de Kooter
59036fc373
Add free format pg_dump backup parameter
2022-07-10 19:03:32 +00:00
Viviana Capote
05943687fe
Added option to also delete backup directory on PVC when AWXBackup CRD object is deleted
2022-06-27 15:45:33 +10:00
David Luong
e966e9299f
Resolves #918 to make no_log configurable ( #923 )
2022-06-16 01:03:13 -04:00
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
Shane McDonald
7310b43a5c
Use kubernetes.core
2021-06-22 14:52:54 -04: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
Yanis Guenane
5bbe7b6e3e
Merge pull request #397 from rooftopcellist/dynamic_secrets
...
Dynamic secret backup & restore
2021-06-16 10:41:04 +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
42141cd159
Do not clean up pvc when awxbackup cr is deleted
...
- This is accomplished by explicitly setting ownerRefs to null
2021-06-15 12:23:04 -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
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