Commit Graph
645 Commits
Author SHA1 Message Date
Stanislav Zaprudskiy ad531c8dce Do not wait for a new Pod name after Deployment change
Proper waiting is already performed earlier during Deplyment{apply: yes, wait: yes} -
https://github.com/ansible-collections/kubernetes.core/blob/e6ac87409830b6c698b05dba875cca87d45ea761/plugins/module_utils/k8s/waiter.py#L27.

And also not every Deployment change produces new RS/Pods. For example,
changing Deployment labels won't cause new rollout, but will cause
`until` loop to be invoked unnecessarily (when replicas=1).
2023-02-07 11:43:34 +01:00
Stanislav Zaprudskiy e589ceb661 When applying Deployment wait up to (timeout * replicas)
There are cases when having a new Deployment may be taking above the
default timeout of 120s.
For instance, when a Deployment has multiple replicas, and each replica
starts on a separate node, and the Deployment specifies new images, then
just pulling these new images for each replica may be taking above the
default timeout of 120s.

Having the default time multiplied by the number of replicas should
provide generally enough time for all replicas to start
2023-02-07 11:41:32 +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
kurokobo b1a547d2a6 fix: add quotes for PGPASSWORD in upgrade_postgres.yml (fixes #1166) (#1167) 2023-01-18 11:59:03 -05:00
Christian Adams 007e47e35c Add pre-reqs to the backup and restore docs (#1186) 2023-01-11 17:18:49 -05:00
David Hageman 21eb83b052 Correct admin password updating (#1179)
Corrects an issue with admin passwords failing to be updated due to shell escaping. This aligns the operator with the logic in the normal installer.
2023-01-11 11:41:35 -05:00
Christian Adams 19c6c77c41 Add ability to configmap and include config files for nginx.conf (#1145) 2022-12-16 10:36:29 -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 <[email protected]>
2022-12-14 14:56:40 -05:00
Stanislav ZaprudskiyandOlivier 4c5bae69ef Add possibility specifying affinity of AWX Pods. (#1139)
* Add an option to specify affinity rules for the awx pod

In some cases, you may want to use affinity rules instead of a
 node selector so you can have more flexbility. For example if you want
to have "soft" rules i.e. run my pod on this node if possible otherwise
run it anywhere

* Rename `node_affinity` to `affinity`
* Maintain defaults and CSV
* Add fields validation

Co-authored-by: Olivier <[email protected]>
2022-12-14 10:39:41 -05:00
dru90iandKirill Smirnov f35bd7cf83 add default cluster name (#1129)
* add default cluster name

* Update awx.ansible.com_awxrestores.yaml

Co-authored-by: Kirill Smirnov <[email protected]>
2022-11-30 14:29:52 -05:00
dale-mittleman dbd1e59a55 Added flag to disable ipv6 listener (#1135) 2022-11-30 10:38:44 -05:00
Christian Adams a5e21b56ae Backup and restore receptor tls secret with expected generated name (#1107) 2022-11-07 11:04:22 -05:00
Shane McDonald e5896d15ed Merge pull request #1078 from FlorianLaunay/devel
use dedicated image for projects persistence PVC init tasks
2022-11-03 19:37:58 -04:00
Christian Adams 6b01ff09ce Amend permissions for backup dir (#1109) 2022-11-03 12:52:48 -04:00
Florian LAUNAY c708cef4dc use dedicated image for projects persistence PVC init tasks 2022-11-03 17:26:00 +01:00
sivateja04 0fc145b6aa Enable configuration of route and ingress api versions (#1098)
* Introduce ingress_api_version and route_api_version
2022-10-26 08:51:15 -04:00
Christian Adams 1c7c89efb3 Use Task container resource requirements for init container (#1084) 2022-10-13 12:27:51 -04:00
chris93111 225c47dbbc fix templating config
indent the comment and remove last -
2022-10-06 13:21:52 +02:00
Julen Landa Alustiza ae0a74bea3 Fix version label truncating
Signed-off-by: Julen Landa Alustiza <[email protected]>
2022-10-05 10:49:47 +02:00
Christian M. Adams d3ca9c57c9 One more no_log default update 2022-10-04 11:36:56 -04:00
Christian Adams 9b1b5e676d Change no_log type to boolean (#1068) 2022-10-04 10:48:51 -04:00
Hao Liu 0611f3efaa add migration code for receptor ca secret
Signed-off-by: Hao Liu <[email protected]>
2022-09-28 16:22:20 -04:00
Hao Liu a94a6f045d change receptor ca secret to tls secret
change the type of secret use for receptor ca to tls secret, to be more "proper"

Signed-off-by: Hao Liu <[email protected]>
2022-09-27 21:38:07 -04:00
Christian Adams 1892b8f0ea Explicitly set kind value to AWX (#1056) 2022-09-20 23:09:13 -04:00
Christian Adams 57b5795aab Determine if k8s or ocp and set var accordingly (#1051)
* conditionally set fsGroup for projects_persistence based on cluster
    type
2022-09-20 23:03:05 -04:00
d64c34f8a4 Add receptor firewall rules to control nodes (#1012)
Support external execution nodes

- Allow receptor.conf to be editable at runtime
- Create CA cert and key as a k8s secret
- Create work signing RSA keypair as a k8s secret
- Setup volume mounts for containers to have access to the needed
  Receptor keys / certs to facilitate generating the install bundle
  for a new execution node
- added firewall rule, work signing and tls cert configuration to default receptor.conf

The volume mount changes in this PR fulfill the following:
- `receptor.conf` need to be shared between task container and ee container
  - **task** container writes the `receptor.conf`
  - **ee** consume the `receptor.conf`
- receptor ca cert/key need to be mounted by both ee container and web container
  - **ee** container need the ca cert
  - **web** container will need the ca key to sign client cert for remote execution node
  - **web** container will need the ca cert to generate install bundle for remote execution node
- receptor work private/public key need to be mounted by both ee container and web container
  - **ee** container need to private key to sign the work
  - **web** container need the public key to generate install bundle  for remote execution node
  - **task** container need the private key to sign the work

Signed-off-by: Hao Liu <[email protected]>
Co-Authored-By: Seth Foster <[email protected]>
Co-Authored-By: Shane McDonald <[email protected]>

Signed-off-by: Hao Liu <[email protected]>
Co-authored-by: Shane McDonald <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
2022-09-09 15:13:05 -04:00
Shane McDonald edecf4d2fe Move labels into reusable templates 2022-08-30 11:00:43 -04:00
Tobias Dahlberg 8dabca5418 Adding ingress class name to ingress template (#716) 2022-08-29 11:11:19 +02:00
Shane McDonald 5c572a9ba6 Merge pull request #1033 from mateuszdrab/patch-1
Remove reference to cluster.local
2022-08-25 08:44:32 -04:00
Shane McDonald b7bbfd432d Merge pull request #1034 from whitej6/jlw-jinj3-filter-update
Fixes #1032 - Update filter to jinja 3.x format
2022-08-25 08:42:42 -04:00
Mac Chaffee dc6cbab501 Import all ldap config classes in settings.py (#961)
* Import all ldap config classes in settings.py
* Add AUTH_LDAP_GROUP_TYPE example to readme

Signed-off-by: Mac Chaffee <[email protected]>
2022-08-24 18:00:08 -04:00
Jeremy White a81be586db update filter to jinja 3.x format 2022-08-24 14:56:08 -05:00
Mateusz Drab f2a9e967cc Remove reference to cluster.local 2022-08-24 20:07:11 +01:00
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 <[email protected]>
Co-authored-by: silvinux <[email protected]>
Co-authored-by: Ivan Aragonés Muniesa <[email protected]>
2022-08-23 23:23:01 -04:00
Christian Adams 7d2d1b3c5e Upgrade to Operator SDK v1.22.2 (#1001)
* Upgrade to Operator SDK 1.16.0

* Upgrade Operator SDK to v1.22.2 & bump base image version
2022-08-22 18:54:56 -04:00
Shane McDonald f368a539a9 Delete logging overrides in configmap 2022-08-22 10:56:37 -04:00
Shane McDonald e3701dd3db Respect LOG_AGGREGATOR_LEVEL 2022-08-18 19:10:54 -04:00
Nikhil 58a4778c89 configure callback receiver workers based on CPU 2022-08-09 13:18:41 +05:30
Shane McDonald 60386bc928 Organize installer templates into subdirectories 2022-08-05 10:45:15 -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
Dimitri Savineau 8a3c8e727a Merge pull request #929 from dsavineau/undefined_limits_key
installer: fix undefined limit key in config
2022-08-02 10:05:47 -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
lutskevichandViktor Lutskevich 82ffa3d348 Restore not managed external postgresql (#877)
* Restore not managed external postgresql

Update postgres.yml for restore from backup not managed external postgresql db.

* Update postgres.yml

* rm trailing spaces #48

Co-authored-by: Viktor Lutskevich <[email protected]>
2022-07-27 16:23: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
Shane McDonald 34b6354001 Merge pull request #956 from Cl0udius/add_auto_upgrade_parameter
added auto_upgrade flag
2022-06-27 13:39:11 -04:00