Compare commits

...
614 Commits
Author SHA1 Message Date
alex ed9b03c281 gitignore: add token to ignored files
CI / molecule (--skip-tags=replicas) (push) Failing after 11m5s
CI / molecule (-t replicas) (push) Failing after 3m6s
CI / no-log (push) Successful in 11s
CI / nox-sessions (push) Failing after 3m20s
CI / Lint scripts & YAML (ubuntu-22.04) (push) Failing after 2m37s
CI / Validate kustomize builds (if any) (push) Failing after 21s
CI / Lint scripts & YAML (ubuntu-20.04) (push) Canceled after 0s
CI / Create release artifact (push) Canceled after 0s
2025-09-12 12:45:30 +02:00
alex 6d6e25e9a0 ci: trigger workflow on main 2025-09-12 12:43:02 +02:00
alex 77f4ce99b2 ci: add repo-root CI workflow (run on main) 2025-09-12 12:32:36 +02:00
alex 71b1291f8d ci: trigger workflow after CI cleanup 2025-09-12 12:04:18 +02:00
alex aec148f8d4 update awx-local-setup submodule to include CI fixes 2025-09-12 11:59:15 +02:00
alex ee8c472c50 awx-local-setup: update submodule (release workflow validation) 2025-09-12 11:39:12 +02:00
alex e3e6bb4690 awx-local-setup: update submodule to include script hardening and CI fix 2025-09-12 11:35:46 +02:00
alexpolo1 8dea9bdbde Merge pull request #1 from alexpolo1:copilot/fix-79f6ebd0-93a2-4a6e-bc6f-075d5658f722
[WIP] help me fix problems
2025-09-12 11:12:20 +02:00
copilot-swe-agent[bot] 09bf89e432 Initial plan 2025-09-12 09:10:41 +00:00
alex 4d7532e450 Update subproject commit reference in awx-local-setup 2025-09-12 10:55:02 +02:00
alex 8ff445de6f Merge remote-tracking branch 'origin/devel' into devel 2025-09-12 09:53:26 +02:00
alex 7c609948ec Update AWX service configurations for NodePort to LoadBalancer and adjust selectors 2025-09-12 09:50:28 +02:00
alex 4029bde2cd Add AWX service and configuration files for NodePort setup 2025-09-12 09:48:29 +02:00
SharveshandChristian Adams bed4aff4cc Fix: Redis ERR max number of clients reached (#2041)
Add timeout to Redis Config

Co-authored-by: Christian Adams <[email protected]>
2025-09-10 09:44:30 -04:00
jamesmarshall24andChristian M. Adams e0a8a88243 Add postgres_extra_settings (#2071)
* Add hacking/ directory to .gitignore as it is commonly used for dev scripts
* Add postgres_extra_settings
* Add postgres_configuration_secret checksum to DB statefulset
* Docs for postgres_extra_settings, CI coverage, and examples
---------
Co-authored-by: Christian M. Adams <[email protected]>
2025-09-03 12:36:34 -04:00
Christian Adams 1c3c5d430d Guard against missing version status on existing CR (#2076) 2025-08-27 16:53:01 -04:00
Joel 6e47dc62c2 Fix installer update-ca-trust command (#1985)
The latest release of the update-ca-trust requires the --output param
if you run as non-root user.

See: https://gitlab.com/redhat/centos-stream/rpms/ca-certificates/-/commit/81a090f89a413487bb8a8677eff9bb4fb8bfbf71
And: https://github.com/ansible/awx-ee/issues/258#issuecomment-2439742296

Fixes: https://github.com/ansible/awx-ee/issues/258
2025-08-25 14:38:18 +02:00
Christian Adams 2e9615aa1e Add configurable pull secret file support to up.sh (#2073)
- Applies a pull-secret yaml file if it exists at hacking/awx-cr.yml
- The operator will look for a pull secret called
  redhat-operators-pull-secret
- This makes it possible to use a private operator image on your quay.io
  registry out of the box with the up.sh
- Add PULL_SECRET_FILE environment variable with default hacking/pull-secret.yml
2025-08-19 11:50:19 -04:00
lucas-benedito e2aef8330e Update the default crd example for the up.sh (#2061) 2025-08-13 17:09:31 -04:00
Ricardo Carrillo Cruz 883baeb16b Revert "Run import_auth_config_to_gateway when public_url is defined … (#2068)
Revert "Run import_auth_config_to_gateway when public_url is defined (#2066)"

This reverts commit ba1bb878f1.
2025-07-31 12:59:43 -04:00
Dimitri SavineauandRicardo Carrillo Cruz ba1bb878f1 Run import_auth_config_to_gateway when public_url is defined (#2066)
Signed-off-by: Dimitri Savineau <[email protected]>
Co-authored-by: Ricardo Carrillo Cruz <[email protected]>
2025-07-30 23:23:49 -04:00
aknochow 45ce8185df Reverting #2064 and Updating descriptions in backup and restore roles (#2060)
* updating task descriptions in backup and restore roles

* Revert "Run import_auth_config_to_gateway when public_url is defined (#2064)"

This reverts commit 54293a0efb.
2025-07-29 23:21:38 +00:00
lucas-beneditoandChristian M. Adams a55829e5d5 Fixes for passwords for FIPS compliance (#2062)
Set password_encryption to scram-sha-256 and re-encrypt db user passwords for FIPS compliance

(cherry picked from commit 0e76404357a77a5f773aee6e2b3a5b85d1f514b7)

Co-authored-by: Christian M. Adams <[email protected]>
2025-07-28 18:52:59 +01:00
Ricardo Carrillo Cruz 54293a0efb Run import_auth_config_to_gateway when public_url is defined (#2064) 2025-07-24 10:25:07 +02:00
Rebeccah HunterandElijah DeLee e506466d08 set api timeout to match proxy timeout (#2056)
feat: set api timeout to match proxy timeout

Timeout before the openshift route times out
not timing out before undercuts usefulness of our log-traceback-middleware in
django-ansible-base that logs a traceback from requests that get timed
out -- because uwsgi or gunicorn has to send the timeout signal to the
worker handling the request. Also leads to issues where requests that
envoy has already timed out are filling up queues of the workers of the
components.

Also, configure nginx to return a 503 if WSGI server doesn't respond.

Co-authored-by: Elijah DeLee <[email protected]>
2025-07-03 20:19:50 +00:00
Albert Daunis e9750b489e Update migrate_schema to use check_migrations (#2025)
Update migrate schema showmigrations conditional
2025-06-25 15:59:23 -04:00
Christian Adams 0a89fc87a6 Update kubernetes.core to 3.2.0 and sdk to v1.36.1 (#2052)
* Update collections to match the other ansible operators

* Update the ansible-operator base image to v1.36.1
2025-06-18 18:12:58 -04:00
Dimitri Savineau 65a82f706c Fix jquery version in redirect page
Other installer uses 3.7.1 and the file on disk is also using 3.7.1
from the rest framework directory.

Signed-off-by: Dimitri Savineau <[email protected]>
2025-06-04 12:17:08 -04:00
Sharvari Khedkar e8f0306ec2 Add route_annotations feature to mesh ingress CRD (#2045)
* Add route_annotations feature to mesh ingress CRD
* update route_annotations type to string
* display Route Annotations only when ingress_type=route
2025-05-12 18:07:21 -04:00
Bruno Rocha f1660c8bd1 Address review comments 2025-05-09 15:08:17 -04:00
Bruno Rocha f967c7d341 fix: explicitly import ldap on config file
File "/etc/tower/conf.d/ldap.py", line 2, in <module>
ldap.OPT_X_TLS_REQUIRE_CERT: True,
^^^^
NameError: name 'ldap' is not defined
2025-05-09 15:08:17 -04:00
aknochow 54072d6a46 fixing backup pvc namespace quotes (#2042) 2025-04-28 08:14:50 -04:00
Christian Adams fb13011aad Check if pg_isready before trying to restore to new postgresql pod (#2039) 2025-04-24 17:08:50 -04:00
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
Christian Adams 4c05137fb8 Update kubernetes.core to 2.4.2 to fix k8s_cp module usage against OCP with virt (#2031) 2025-03-17 12:12:32 -04:00
aknochow 07540c29da fixing quotes on namespace to support namespace names with only numbers (#2030) 2025-03-17 09:19:02 -04:00
jamesmarshall24andChristian Adams 5bb2b2ac87 Add deployment type shortname for legacy API url (#2026)
* Add deployment type shortname for legacy API url

* Add trailing slash to legacy API url

Co-authored-by: Christian Adams <[email protected]>

---------

Co-authored-by: Christian Adams <[email protected]>
2025-03-05 15:04:01 -05:00
shellclearandSeth Foster 039157d070 Parameterization of the client_max_body_size directive in Nginx (#2014)
Enables users to customize client_max_body_size in Nginx conf to allow
for larger file uploads. This is useful in cases when users need to upload
large subscription manifest files.

---------

Co-authored-by: Seth Foster <[email protected]>
2025-02-24 12:50:08 -05:00
Christian Adams bb4f4c2eb4 Fail early if postgres_configuration_secret is specified by does not exist (#2015) 2025-02-17 12:38:06 -05:00
Christian Adams 97efcab2a2 Accepts new status conditions from the operator on the CR object (#2016) 2025-02-17 12:36:43 -05:00
aknochow c08c1027a1 idle_deployment - Scale down deployments to put AWX into an idle state (#2012)
- separating database_configuration and deployment tasks into separate files to add ability to call configuration independently
2025-02-11 11:01:18 -05:00
Yuval Lahav 3d1ecc19f4 AAP-38745 Increase limits in manager.py (#2006)
* AAP-38745 Increase limits in manager.py

Closes https://issues.redhat.com/browse/AAP-38745

* Update manager.yaml
2025-01-20 11:32:49 -05:00
aknochow 5d0f91ec13 adding conditional to checksum template and removing default for public_base_url to fix undefined variable 2024-12-02 11:54:13 -05:00
Christian Adams 6ab32a42cf Add up.sh and down.sh development scripts for consistency with other ansible operators (#1991) 2024-11-26 11:25:24 -05:00
Chris Meyers 9718424483 Point at awx devel collection
* awx.awx collection on galaxy is ooooold at this point. Releases are
  paused, so point at awx collection in devel to get that new bleeding
  edge hotness.
2024-11-07 12:53:53 -05:00
aknochow d5683adaf8 adding redirect page (#1982) 2024-10-29 17:47:41 -04:00
Christian Adams 1bc342258a Only set upgradedFrom status if previous_version is explicitly set (#1980) 2024-10-23 13:51:18 -04:00
Hao Liu 79ab6f0b5e Fix disable reverse sync on mgmt command (#1977) 2024-10-18 15:02:28 +00:00
Christian Adams 3822e32755 Add upgradedFrom status for check-version changes (#1975) 2024-10-17 19:28:43 +00:00
Christian AdamsandDimitri Savineau c30d4c174d Compare gating version against existing deployment versions (#1972)
* Compare gating version against existing deployment versions and set upgradeFrom status
* Add quotes to default version

Co-authored-by: Dimitri Savineau <[email protected]>
2024-10-16 17:43:26 -04:00
Christian Adams 8a5ec6e19c Fix Label PR check by using python venv for requests library (#1973) 2024-10-16 13:00:50 -04:00
Alan Rominger d4de2d3c44 Disable reverse sync for management commands (#1970) 2024-10-09 16:26:24 -04:00
Djebran Lezzoum 848cf17d0b Deprecate LDAP auth (#1969)
deprecate external auth related configuration

issue: https://issues.redhat.com/browse/AAP-29476
2024-10-08 12:25:23 -04:00
Djebran Lezzoum ae86cb3d13 Skip django_auth_ldap import if missing (#1955) 2024-10-02 09:36:00 -04:00
mihirlele 70ec7a5304 Add ability to exclude postgres data during migration to Openshift AAP operator (#1954) 2024-09-20 03:23:39 +00:00
aknochow 532be386fc fix postgres user permissions for upgrades (#1959) 2024-09-18 13:24:18 -04:00
Andrew Klychkov 0367516203 Docs: remove IRC/ML/google.gropus remnants (#1956) 2024-09-16 09:32:16 +01:00
Andrew Klychkov 8bad25cbc7 Docs: update communication section (#1945) 2024-09-05 09:11:13 +01:00
Elijah DeLee f50c029408 add graceful harakiri
now there is way for uwsgi to send signal for graceful harakiri to try and handle it nice way before sending signal 9

pairs with https://github.com/ansible/awx/pull/15447/files
2024-09-04 15:40:59 -04:00
Don Naro 4f87143719 mention helm docs in readme (#1951)
* mention helm docs in readme

* point to gh pages instead of rtd
2024-09-03 13:13:27 +01:00
Don Naro f0a518baf6 Remove Helm chart code (#1938)
* rm Helm chart starter directory

* rm Helm release playbook

* rm Helm install from docs

* rm Helm chart workflows

* rm Helm starter from yamllint

* rm Helm targets from Makefile

* Revert "rm Helm targets from Makefile"

This reverts commit da383601683c7fe277fce61a4d62bd0380ff2bd2.

* remove helm from Makefile

* rm kubectl-slice and yp from Makefile
2024-08-08 13:39:33 -04:00
Imed 8224b0b354 Adding postgres annotations support (#1829)
* Adding postgres annotations support

Authored-by: Imed Aouidene <[email protected]>
2024-07-24 18:45:06 +00:00
Guillaume LefevreandGuillaume Lefevre d42737993f Change ansible k8s_info tasks api_version for Job kind to batch/v1 (#1833)
Co-authored-by: Guillaume Lefevre <[email protected]>
2024-07-24 18:38:04 +00:00
dependabot[bot] a95815561a Bump docker/login-action from 3.2.0 to 3.3.0 in the dependencies group (#1924)
Bumps the dependencies group with 1 update: [docker/login-action](https://github.com/docker/login-action).


Updates `docker/login-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/0d4c9c5ea7693da7b068278f7b52bda2a190a446...9780b0c442fbb1117ed29e0efdff1e18412f7567)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 14:09:04 -04:00
kurokoboandDon Naro 2b0221bbc6 docs: overall minor renovations (#1874)
* docs: simplify README.md and make index.md to refer to it
* docs: change order for pages in navigation and add missing pages
* docs: fix headings to improve navigation, transform notes to admonition, fix indentation, linting issues and minor issues
* docs: merge docs for using images from private registries
* docs: add example to integrate LDAP configuration via extra_settings_files
* Apply suggestions from code review
docs: apply suggested changes

Co-authored-by: Don Naro <[email protected]>

* docs: update the doc site url as same as the url in https://www.ansible.com/ecosystem/
* docs: minor fixes for hpa page
* docs: expand note block
* docs: apply #1904 to README.md

---------

Co-authored-by: Don Naro <[email protected]>
2024-07-20 18:34:21 -04:00
Dimitri Savineau 36cf9c23ea web: Add volume to handle debug logs (#1921)
When enabling debug web requests, the /var/log/tower directory needs
to exist.
Rather than just creating that directory in the container image then
create an emptyDir volume.

Closes: #1485

Signed-off-by: Dimitri Savineau <[email protected]>
2024-07-16 11:58:27 -04:00
Christian Adams 041270ffbe Use task_resource_requirements for migration k8s job (#1912) 2024-07-10 15:51:47 -04:00
dependabot[bot] 9f917231a0 Bump the dependencies group with 6 updates (#1909)
Bumps the dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3` | `4` |
| [actions/setup-python](https://github.com/actions/setup-python) | `4` | `5` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `2` | `4` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.8.0` | `1.10.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.0.0` | `3.2.0` |
| [github/issue-labeler](https://github.com/github/issue-labeler) | `2.4.1` | `3.4` |


Updates `actions/checkout` from 3 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

Updates `actions/setup-python` from 4 to 5
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

Updates `actions/upload-artifact` from 2 to 4
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v4)

Updates `helm/kind-action` from 1.8.0 to 1.10.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.8.0...v1.10.0)

Updates `docker/login-action` from 3.0.0 to 3.2.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/343f7c4344506bcbf9b4de18042ae17996df046d...0d4c9c5ea7693da7b068278f7b52bda2a190a446)

Updates `github/issue-labeler` from 2.4.1 to 3.4
- [Release notes](https://github.com/github/issue-labeler/releases)
- [Commits](https://github.com/github/issue-labeler/compare/v2.4.1...v3.4)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 14:30:29 -04:00
Chi Cuong HAandChristian Adams cdab3dd538 fix: Make basic install without operator works (#1875)
- Update role name for README.md
  - Avoid the this_awx['resources'][0] is undefined in database_configuration.yml
  - Add update_status variable to include or not the update_status.yml
  - metrics_utility_enabled exists in CRD but not as variable

Co-authored-by: Christian Adams <[email protected]>
2024-07-03 19:12:47 +00:00
Stéphane Bilqué 0444ae31db Allow to scale up the operator pods by using the Helm Chart (#1881)
* Allow to scale up the operator pods by using the Helm Chart
* Add support for horizontal pod autoscaling (#1676)
* fix: spec.replicas
2024-07-03 18:46:47 +00:00
e5a24b8918 Update Dockerfile ansible-operator to v1.34.2, operator-sdk to v1.34.2 (#1883)
* Updates operator-framework/ansible-operator tag from v1.34.0 to v1.34.2

* Update operator-sdk release to v1.34.2

---------

Co-authored-by: meganerd <[email protected]>
Co-authored-by: jessicamack <[email protected]>
2024-07-03 14:42:52 -04:00
Stéphane BilquéandChristian Adams f9792d486e Fix: Enable the creation of a helm chart with a name other than awx-operator (#1884)
Enable the proper creation of a helm chart with a name other than awx-operator

Co-authored-by: Christian Adams <[email protected]>
2024-07-03 18:37:34 +00:00
llussyandChristian Adams dd37ebd440 Update index.md (#1904)
CI / molecule (--skip-tags=replicas) (push) Failing after 3m57s
CI / molecule (-t replicas) (push) Failing after 5m9s
CI / helm (push) Failing after 5m23s
CI / no-log (push) Successful in 14s
CI / nox-sessions (push) Failing after 3m7s
* Update docs/installation/index.md

---------

Co-authored-by: Christian Adams <[email protected]>
2024-06-26 20:17:22 +00:00
JagannathS 4a1e3c1075 Update kind-install.md (#1903)
the kind install command had reference to oc (openshift cli). removed that and made it to kubectl
2024-06-26 20:15:37 +00:00
Don Naro 4b6eb8df05 Add github-actions package manager (#1900)
add github-actions package manager

This change adds github-actions package manager to the dependabot config
file to bump action versions.
2024-06-26 15:52:28 -04:00
aknochow 9fc3738b53 Split metrics utility cronjobs for crc and local report (#1906)
* fixing metrics-utility variables and conditionals

* separating metrics-utility for console into separate tasks and conditionals
2024-06-26 10:52:58 -04:00
Seth Foster e3c2720681 Wait for instance ready in molecule test (#1901)
CI / molecule (--skip-tags=replicas) (push) Failing after 5m44s
CI / molecule (-t replicas) (push) Failing after 6m0s
CI / helm (push) Failing after 7m24s
CI / no-log (push) Successful in 29s
CI / nox-sessions (push) Failing after 4m23s
Sometimes a job is launched through the web api
before the instance is in a ready state. This throws
a 500 internal server error, causing CI to fail.

Adds a task to query the instances endpoint
and check that at least one control node is
in a ready state.

Signed-off-by: Seth Foster <[email protected]>
2024-06-18 23:11:04 -04:00
Christian Adams 23a3266b4a Fix nox test failure (#1899)
Fix nox test failure by bumping nox action to wntrblm/[email protected]
2024-06-13 20:23:03 -04:00
Stéphane BilquéandStéphane BILQUÉ e271515385 Ability to add custom labels to the DB migration pods (#1878)
add the labels from the 'additional_labels' parameter in the awx-migration pods

Co-authored-by: Stéphane BILQUÉ <[email protected]>
2024-06-12 14:42:28 -04:00
David Hageman 13abaab1b3 Add scheduling controls to Mesh Ingress (#1892) 2024-06-12 11:33:03 -04:00
Ricardo Carrillo Cruz 01bde2cebb Cast manage_replicas to bool (#1893) 2024-06-06 14:43:20 +02:00
Joel c696eda50a Fix custom CA certificates for task/web/migration (#1846)
* Fix bundle_ca_crt for task/web/migration

- added a new init container init-bundle-ca-trust
- added volume ca-trust-extracted to the migration job
- added volume ca-trust-extracted to the init container init-database
- removed volume bundle-ca from all follow-up containers
2024-06-05 22:56:52 -04:00
Hao Liu a260ab6873 Fix migrating from devel version to devel version (#1890)
upgrading from devel version to devel version currently don't run migration because we chopped off the git sha
2024-06-05 14:10:51 -04:00
Hao Liu 9fa46bea43 Enable readiness probe for task pod in CI (#1891)
Avoid race condition where job launch before task container is ready
2024-06-05 14:07:08 -04:00
David Hageman 8ead140541 Add support for horizontal pod autoscaling (#1676)
CI / molecule (--skip-tags=replicas) (push) Failing after 1m59s
CI / molecule (-t replicas) (push) Failing after 2m27s
CI / helm (push) Failing after 6m16s
CI / no-log (push) Successful in 25s
CI / nox-sessions (push) Failing after 3m28s
2024-06-03 15:59:48 -04:00
Hao Liu 6820981dd5 Use check_instance_ready for task pod readiness (#1885) 2024-05-31 09:33:29 -04:00
kurokobo 56df3279a6 feat: implement extra_settings_files (#1836)
* feat: implement extra_settings_files
* fix: reduce duplicated code blocks by templates
* docs: update docs for extra settings
* docs: simplify the commands
* docs: add notes for duplicated keys in setting files
2024-05-23 13:40:51 -04:00
aknochow 64fb262830 fixing metrics-utility variables and conditionals (#1872) 2024-05-22 15:29:26 -04:00
Hao Liu 5d99553fa6 Improve logging in CI (#1868)
CI / molecule (--skip-tags=replicas) (push) Failing after 1m53s
CI / molecule (-t replicas) (push) Failing after 1m57s
CI / helm (push) Failing after 3m34s
CI / no-log (push) Successful in 12s
CI / nox-sessions (push) Failing after 1m25s
- Set AWX log level to DEBUG
- Fix failure to collect awx API output
2024-05-22 13:56:49 +00:00
aknochow cecf812382 moving metrics_utility defaults to vars/main.yaml and setting default… (#1869)
moving metrics_utility defaults to vars/main.yaml and setting default secret undefined to fix conditional
2024-05-21 18:16:14 -04:00
Hao Liu 3f0fd7f965 Fix CI failure (#1863)
Unpin collection in molecule

Fix CI failure
2024-05-20 18:36:27 -04:00
dependabot[bot] f27d7b28b8 Bump mkdocs-ansible from 24.3.0 to 24.3.1 in /docs in the dependencies group (#1856)
Bump mkdocs-ansible in /docs in the dependencies group

Bumps the dependencies group in /docs with 1 update: [mkdocs-ansible](https://github.com/ansible/mkdocs-ansible).


Updates `mkdocs-ansible` from 24.3.0 to 24.3.1
- [Release notes](https://github.com/ansible/mkdocs-ansible/releases)
- [Commits](https://github.com/ansible/mkdocs-ansible/compare/v24.3.0...v24.3.1)

---
updated-dependencies:
- dependency-name: mkdocs-ansible
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 15:05:09 -04:00
Christian Adams a8da7f9398 Add support for spec overrides when restoring AWX (#1862) 2024-05-17 15:47:26 -04:00
fluzzykitten 4720d29fda Update k8s_exec and k8s_cp to include container name (#1858)
Update secrets.yml

We need to specify a container in environments that use sidecar injection, like in the case of istio service mesh. If the container is not specified, and a side car is injected so there are multiple containers running in the pod, this task will fail because a container was not specified in a pod with multiple containers.
2024-05-16 16:32:38 -04:00
Christian Adams 64e4279d96 Fix innocuous but confusing typo in db management pod task (#1859) 2024-05-16 15:17:39 -04:00
David Hageman cf61205f49 Create _metrics_utility_secret for metrics utility (#1857) 2024-05-16 13:29:04 -04:00
larsux e98c913f86 Add postgresql option target_session_attrs (#1847)
Signed-off-by: Lars Wildemann <[email protected]>
2024-05-15 18:47:33 +00:00
jamesmarshall24 b49d68ca92 Expose websockets on api prefix v2 (#1842)
Expose websockets on controller v2
2024-05-01 15:47:23 -04:00
YaronL16 9638a2b284 Added custom logos by volume mounts documentation (#1840) 2024-05-01 19:34:50 +00:00
Ranvit Bommineni 4fc20de72e add tolerations/nodeselector to migration job template (fixes #1774) (#1804)
Enable fallback to global settings for db-migration job scheduling (#1804)

Modified the db-migration job template to use `task_*` settings with a fallback to global AWX configurations if not specified.
2024-05-01 15:10:29 -04:00
Tom Siewert 6fff7cb485 installer: nginx: add missing locales location required by ui_next (#1822)
The new UI depends on the locales available via ingress/locales which
is being served as static file and not via Django.

A change in the nginx.conf was already done for the dev environment
in commit ec4f10d86881389af12371f90cb75af03417d109 (AWX), but not
here.

Signed-off-by: Tom Siewert <[email protected]>
2024-05-01 15:05:43 -04:00
David Hageman 6baf3a174d Add database secret to metric jobs (#1843) 2024-04-30 16:12:31 -04:00
Dimitri Savineau ed72dc12b2 Add explicit list filter after rejectattr (#1845)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m21s
CI / molecule (-t replicas) (push) Failing after 2m25s
CI / helm (push) Failing after 4m57s
CI / no-log (push) Successful in 12s
CI / nox-sessions (push) Failing after 1m26s
With ansible 2.9.27 (operator-sdk v1.27.0) then the rejectattr filter
returns a generator so we need to cast it to list.
The behavior doesn't exist when using a more recent operator-sdk
version like v1.34.0 (ansible-core 2.15.8) but using the list
filter on that version works too (even if not needed)

"<generator object select_or_reject at 0x7fbbf0443728>"

This is a similar issue as 80a9e8c.

TASK [Get the new resource pod information after updating resource.]
********************************
FAILED! => {"msg": "The conditional check '_new_pod['resources'] | rejectattr('metadata.deletionTimestamp', 'defined') | length' failed.
The error was: Unexpected templating type error occurred on ({% if _new_pod['resources'] | rejectattr('metadata.deletionTimestamp', 'defined') | length %} True {% else %} False {% endif %}): object of type 'generator' has no len()

This also removes the unneeded quotes on the when conditions.

Signed-off-by: Dimitri Savineau <[email protected]>
2024-04-29 23:35:37 -04:00
Dimitri Savineau 3fa60853a2 backup: Remove default parameter from jinja map (#1839)
CI / molecule (--skip-tags=replicas) (push) Failing after 4m29s
CI / molecule (-t replicas) (push) Failing after 3m16s
CI / helm (push) Failing after 23s
CI / no-log (push) Successful in 12s
CI / nox-sessions (push) Failing after 1m41s
The default paramater from the jinja map filter has been added in the
2.11.0 release.
However, the downstream ansible operator is still using ansible 2.9
with jinja 2.10.x so using the default parameter leads to the
following error:

TASK [Dump ingress tls secret names from awx spec and data into file]
********************************
The error was: jinja2.exceptions.FilterArgumentError: Unexpected
keyword argument 'default'
fatal: [localhost]: FAILED! => {
  "msg": "Unexpected failure during module execution.",
  "stdout": ""
}

Rather than using the default parameter with the map filter then add the
selectattr filter to get only the items with tls_secret defined and then
get the tls_secret attribute with the map filter.

This also gets rid of the when statement since we always get an empty
list when no tls_secret are present in ingress_hosts so the loop statement
will be skipped on the empty list.

Finally this changes the default value from the ingress_hosts field because
it's a list rather than a string.

https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.map

Signed-off-by: Dimitri Savineau <[email protected]>
2024-04-23 10:36:42 -04:00
Florian SeyandFlorian Sey f8bbe9f55a Format Markdown list properly in upgrading.md (#1825)
Ensures the list is properly rendered in readthedocs website.
Improves the documentation to build and serve the docs locally.

Co-authored-by: Florian Sey <[email protected]>
2024-04-17 19:15:03 +00:00
dependabot[bot] c7c7171110 Bump the dependencies group in /docs with 1 update (#1802)
Bumps the dependencies group in /docs with 1 update: [mkdocs-ansible](https://github.com/ansible/mkdocs-ansible).

Updates `mkdocs-ansible` from 24.2.1 to 24.3.0
- [Release notes](https://github.com/ansible/mkdocs-ansible/releases)
- [Commits](https://github.com/ansible/mkdocs-ansible/compare/v24.2.1...v24.3.0)

---
updated-dependencies:
- dependency-name: mkdocs-ansible
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 14:36:32 -04:00
kurokobo b7370d0e48 docs: add a tip to add extra settings through configmaps or secrets and improve an example for that (#1824)
* docs: add a tip to add extra settings through configmaps or secrets and improve an example for that
2024-04-17 14:33:43 -04:00
Hao Liu 0b37f76225 Output debug resource to file in molecule test (#1823)
- output all relevant k8s resource to file on failure
- output awx job list and job details to file on failure
- output all pod logs to file on failure
- added STORE_DEBUG_OUTPUT to enable debug output gathering
- added DEBUG_OUTPUT_DIR to control where the debug output files will be stored
- when molecule test fail in CI trigger artifact gathering
2024-04-12 13:52:48 -04:00
aknochow e6e1025206 adding new variables for redhat hybrid cloud console to metrics-utility (#1816)
adding new variables for redhat hybrid cloud console shipping
simplifying configmap and secret setup
making pvc creation conditional on ship_target type being directory
2024-04-11 19:30:39 -04:00
Hao Liu a5d5028dae Add AWX_EE_TEST_IMAGE option to molecule test (#1819) 2024-04-10 17:43:08 +00:00
kurokobo 413b7003a2 docs: fix incorrect command for getting ingressroutetcp resources (#1778)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m36s
CI / molecule (-t replicas) (push) Failing after 2m5s
CI / helm (push) Failing after 3m22s
CI / no-log (push) Successful in 12s
CI / nox-sessions (push) Failing after 1m33s
2024-04-05 23:07:46 -04:00
Christian Adams 7b02b5df04 Set default for -iness probe parameters and add docs (#1808) 2024-04-03 14:26:41 -04:00
a5211fe511 Add postgres init container to resolve permissions for some k3s deployments (#1805)
Add postgres init container if
postgres_data_volume_init is true

This is aimed to solve the issue where users may
need to chmod or chown the postgres
data volume for user 26, which is the user
that is running postgres in the sclorg image.

For example, one can now set the follow on the AWX spec:
spec:
  postgres_init_container_commands: |
    chown 26:0 /var/lib/pgsql/data
    chmod 700 /var/lib/pgsql/data

Deprecate postgres_init_container_resource_requirements param in favor
of postgres_resource_requirements param.

Signed-off-by: Seth Foster <[email protected]>
Co-authored-by: craph <[email protected]>
Co-authored-by: kurokobo <[email protected]>
Co-authored-by: Christian M. Adams <[email protected]>
2024-04-03 13:19:57 -04:00
Hao Liu fcbf394272 Fix "external_hostname" should not be required while using Route ingress (#1807)
Fix "external_hostname" required on OCP
2024-04-03 16:16:16 +00:00
Christian Adams 7bf49c207a Remove the ability to customize the postgres_data_dir (#1798)
* in the sclorg Postgresql 15 image, the PGDATA directory is hardcoded
* if users were to modify this directory, they would only change the
  directory the pvc is mounted to, not the directory PostgreSQL uses.
  This would result in loss of data.
* switch from /var/lib/pgsql/data/pgdata to /var/lib/pgsql/data/userdata
2024-03-31 21:58:33 -04:00
aknochow 3c70598704 setting Metrics-Utility Image to only display when enabled (#1796) 2024-03-27 21:39:11 +00:00
Dimitri Savineau 80a9e8c156 postgresql: Cast sorted_old_postgres_pods as list (#1791)
With ansible 2.9.27 (operator-sdk v1.27.0) then the reverse filter
returns an iterator so we need to cast it to list.
The behavior doesn't exist when using a more recent operator-sdk
version like v1.34.0 (ansible-core 2.15.8) but using the list
filter on that version works too (even if not needed)

"sorted_old_postgres_pods": "<list_reverseiterator object at 0x7f539eaa5610>"

Signed-off-by: Dimitri Savineau <[email protected]>
2024-03-27 14:31:53 -04:00
Don Naro dc0e86b823 Add noxfile and workflow to test docsite PRs (#1794)
* add noxfile with mkdocs build session

* add nox build check

* include reusable nox in ci workflow
2024-03-27 14:29:38 -04:00
kurokobo 07b8120788 fix: add retries to find running web pod (#1787) 2024-03-27 14:25:10 -04:00
kurokobo a6e7a1bec3 fix: correct readinessProbe for web pod (#1786)
fix: correct readinesProbe for web pod
2024-03-27 14:21:23 -04:00
zaki-lknrandkurokobo 809491bce0 docs: add description of init container image definition (#1779)
* docs: add description of init container image definition

Co-authored-by: kurokobo <[email protected]>
2024-03-27 14:19:48 -04:00
Dimitri Savineau 5e66b6aeb0 csv: Fix metrics utility fields (#1783)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m32s
CI / molecule (-t replicas) (push) Failing after 3m52s
CI / helm (push) Failing after 20s
CI / no-log (push) Successful in 11s
The metrics utility fields were configured under the statusDescriptors
section rather than specDescriptors so displaying those fields in the
UI wasn't done correctly (not under the Advanced section nor using the
correct field type).

This also changes the `metrics_utility_configmap` descriptor from
`urn:alm:descriptor:com.tectonic.ui:selector:core:v1:ConfigMap` to
`urn:alm:descriptor:io.kubernetes:ConfigMap` because the first value
doesn't work.

Finally, all metrics utility fields are only displayed (in the Advanced
section) when `metrics_utility_enabled` is enabled (not default).

Signed-off-by: Dimitri Savineau <[email protected]>
2024-03-26 09:16:27 -04:00
aknochow c6fe038fe4 Adding support for ansible metrics-utility (#1754)
- Adding metadata, storage_class, and pullsecret for metrics-utility
- Updating crd, csv and defaults
- Adding metrics-utility cronjob
2024-03-20 11:05:13 -04:00
kurokobo 49d7a566b2 docs: add tips about traefik api groups (#1757) 2024-03-14 16:25:44 +00:00
Don Naro 3cf912c998 Add dependabot config to bump doc dependencies (#1758) 2024-03-14 12:13:18 -04:00
Hao Liu 0dbf3ddff8 Add ServiceAccount and ImagePullSecet to migration job (#1763)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m32s
CI / molecule (-t replicas) (push) Failing after 1m56s
CI / helm (push) Failing after 4m3s
CI / no-log (push) Successful in 12s
Add ServiceAccount and ImagePullSecet to migration pod
2024-03-13 20:56:56 +00:00
aknochow af16e9e73f Updating image pull policy for awx-operator to IfNotPresent (#1761) 2024-03-13 16:51:06 -04:00
Seth FosterandHao Liu 154b801cfc Change default value for postgres_data_path (#1766)
* Change default value for postgres_data_path

/var/lib/postgresql/data/pgdata
to
/var/lib/pgsql/data/pgdata

postgres 15 uses a different location for
postgres data directory.

Fixes issue were database was not being written
to the mounted in volume, and if the postgres
container restarted, data would be lost.

Signed-off-by: Seth Foster <[email protected]>
---------

Signed-off-by: Seth Foster <[email protected]>
Co-authored-by: Hao Liu <[email protected]>
2024-03-13 16:17:49 -04:00
Hao Liu a8acae4af5 Don't delete old postgres 13 volume automatically (#1767)
Leave old postgres-13 volume alone in case of unforseen upgrade failure for restore purposes

User can manually delete old PVC after verifying upgrade is completed
2024-03-13 15:23:10 -04:00
Hao Liu 6e31feaa20 Add command when specifying args for postgres (#1765)
When using args the container defaults to the entrypoint instead of command

causing postgres to be in a crashloop
2024-03-13 15:16:05 -04:00
Hao Liu a53a10ad33 Whitelist test and enforce test order (#1762)
also reduce replica count during test to save CPU/memory
2024-03-13 13:50:33 -04:00
Christian Adams d5a3cb7519 Revert change to cast settings values to strings as they could be nested (#1756)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m4s
CI / molecule (-t replicas) (push) Failing after 2m7s
CI / helm (push) Failing after 4m23s
CI / no-log (push) Successful in 20s
- We cast the settings value to a string so that it would display
  properly in the Openshift UI. Unfortunately, the k8s validator will no
  longer allow arrays for settings values.
2024-03-12 11:58:00 -04:00
Christian Adams ed6ac1a11a Create a new postgres configuration secret when restoring a new instance (#1733)
- This will avoid the operator changing the host value of the original
  deployments postgres_configuration_secret. As it was, restores broke
  the original deployment if it was still around before this change.

Signed-off-by: Christian M. Adams <[email protected]>
2024-03-11 16:34:43 -04:00
Hao LiuandSeth Foster b5d81b8e5d Fix awx_kube_devel (#1759)
* Fix awx_kube_devel
* Sanitize version name for kube_dev

When in development mode, awx version may look
like 23.9.1.dev18+gee9eac15dc.d20240311

k8s job to the migration can only have
a name with alphanumeric, and '.', '-'

so we can just drop off the +

Signed-off-by: Seth Foster <[email protected]>

---------

Signed-off-by: Seth Foster <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
2024-03-11 19:01:00 +00:00
bartowlandHao Liu 3abeec518a Bind EE images version with DEFAULT_AWX_VERSION (#1740)
* bind ee_images, control_plane_ee_image and init_container_image with DEFAULT_AWX_VERSION instead of "latest"

* fix when condition on init_container_image_version check

* Use DEFAULT_AWX_VERSION for AWXMeshIngress

* Add back AWX EE latest for backward compatibility

---------

Co-authored-by: Hao Liu <[email protected]>
2024-03-11 14:12:10 -04:00
Christian Adams d2c4b9c8a4 The pg service label_selector now uses the deployment_type variable (#1755) 2024-03-08 09:02:31 -05:00
Christian Adams 2ad1d25120 Update PostgreSQL docs about finding default version (#1747) 2024-03-07 21:47:18 -05:00
Hao Liu 26e72b4e1d Fix undefined external_hostname when using Route (#1753) 2024-03-07 22:53:48 +00:00
Hao Liu 3434cbef96 AWXMeshIngress route respect external_hostname (#1752)
* AwxMeshIngress route respect external_hostname
* Set host in AWXMeshIngress route if external_hostname is defined
2024-03-07 15:43:06 -05:00
David Hageman 256d84a42a Add imagePullSecrets option to Mesh Ingress (#1750) 2024-03-07 13:17:39 -05:00
kurokobo 03cfe14c07 fix: extend expiration date for the certs for receptor nodes to 10 years (#1744) 2024-03-06 19:52:04 +00:00
Tyler Muir 82c7dd2f44 add support for defining loadbalancer class (#1746) 2024-03-06 14:35:16 -05:00
Erez Samimi 818b3682fa Fix table format in container-probes.md (#1748) 2024-03-06 19:28:46 +00:00
David Hageman ffba1b4712 Add -ness checks and refactor migrations (#1674) 2024-03-05 19:54:22 -05:00
kurokobo dba934daa0 fix: revert type of status.upgradedPostgresVersion to string (#1745) 2024-03-04 15:55:16 -05:00
aknochow d0827ba426 Fixing postgres upgrade conditional (#1741) 2024-03-01 17:09:15 -05:00
kurokobo 16b2f2a34f fix: correct unsafe conditional (#1737) 2024-03-01 20:54:40 +00:00
607a7ca58c Upgrading to PostgreSQL 15 and moving to sclorg images (#1486)
* Upgrading to postgres:15
* Changing image from postgres to sclorg
* Handle scenario where upgrade status is not defined & correct pg tag
* Rework the upgrade logic to be more resiliant for multiple upgrades

---------

Co-authored-by: john-westcott-iv <[email protected]>
Co-authored-by: Christian M. Adams <[email protected]>
2024-02-29 17:02:11 -05:00
kurokobo d11d66e81d docs: enable search feature (#1725) 2024-02-28 19:46:04 +00:00
Christian Adams 7a937b0932 Expose extra_settings in OLM UI form (#1732)
Expose extra_settings in olm UI form

Signed-off-by: Christian M. Adams <[email protected]>
2024-02-28 14:35:05 -05:00
Don Naro e1c0e33b4f Use pip tools to generate the full dependency tree (#1727)
* add venv to gitignore

* use pip compiled docs requirements
2024-02-28 14:33:29 -05:00
Neev Geffen cf905ca5d0 CSV Change Descriptor of StorageClass From Text to StorageClass (#1729)
Update awx-operator.clusterserviceversion.yaml:
Some Descriptors for StorageClasses were set as text and not Storage Class
2024-02-28 19:19:24 +00:00
Hao Liu 630a5ee1f3 Fix bug where uppercase Route fails (#1731)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m21s
CI / molecule (-t replicas) (push) Failing after 2m5s
CI / helm (push) Failing after 5m1s
CI / no-log (push) Successful in 11s
2024-02-26 17:17:37 +00:00
Matt Miller 3d78e90ab1 Update Dockerfile operator-framework/ansible-operator to v1.34.0 (#1714)
Update Dockerfile base image

* Vulnerability scans against this image when deployed shows: CVE-2023-4911
* https://quay.io/repository/operator-framework/ansible-operator/manifest/sha256:f08f675976f42dc3a8ebbb8482acea153a8f57232e2ee48940e3d40ca40d24d9?tab=vulnerabilities
* It appears if https://github.com/ansible/awx-operator/blob/5f3d9ed96f05b25b3c7f38df550d9f2bce0ec199/Dockerfile#L1C14-L1C49 is updated to `v1.34.0` this vulnerability is mitigated.
2024-02-21 14:50:08 -05:00
kurokobo 3981e6ba5e fix: correct indentation for annotations for awxmeshingress (#1723)
fix: correct indentation for annotations
2024-02-21 19:46:34 +00:00
kurokoboandSeth Foster ac682a9c05 docs: improve documentation for awxmeshingress (#1724)
* add descriptions and examples for awxmeshingress
* convert list to table
* add note for image
* correct minor wording issues
* apply suggested changes from code review for docs/user-guide/advanced-configuration/mesh-ingress.md

Co-authored-by: Seth Foster <[email protected]>
2024-02-21 14:36:50 -05:00
kurokobo 7bdf48ffc0 docs: add description for --force-conflicts option to upgrade crds (#1717) 2024-02-21 14:31:32 -05:00
Seth Foster fc11db4ece Fix syntax error in mesh ingress docs (#1720)
Signed-off-by: Seth Foster <[email protected]>
2024-02-16 17:16:28 +00:00
TVo 148309325e Separate out the custom receptor CA section to its own section. (#1707) 2024-02-16 10:06:05 -07:00
82756ebfe7 Add new doc for AWXMeshIngress (#1706)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m9s
CI / molecule (-t replicas) (push) Failing after 2m25s
CI / helm (push) Failing after 3m33s
CI / no-log (push) Successful in 12s
* Add new doc for AWXMeshIngress

* Update docs/user-guide/advanced-configuration/mesh-ingress.md

Co-authored-by: TVo <[email protected]>

* Update docs/user-guide/advanced-configuration/mesh-ingress.md

Co-authored-by: Seth Foster <[email protected]>

* Update docs/user-guide/advanced-configuration/mesh-ingress.md

Co-authored-by: TVo <[email protected]>

* Update docs/user-guide/advanced-configuration/mesh-ingress.md

Co-authored-by: TVo <[email protected]>

* Update mesh-ingress.md

* Update mesh-ingress.md

* Grammar on line 48

---------

Co-authored-by: TVo <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
2024-02-15 13:07:35 -07:00
kurokobo a9cee5f4da fix: revert removal trim symbol before endif (#1715) 2024-02-15 17:02:48 +00:00
Chris Meyers 5f3d9ed96f More locked down websocket path
* Previously, the nginx location would match on /foo/websocket... or
  /foo/api/websocket... Now, we require these two paths to start at the
  root i.e. <host>/websocket/... /api/websocket/...
* Note: We now also require an ending / and do NOT support
  <host>/websocket_foobar but DO support <host>/websocket/foobar. This
  was always the intended behavior. We want to keep
  <host>/api/websocket/... "open" and routing to daphne in case we want
  to add more websocket urls in the future.
2024-02-13 15:53:34 -05:00
Chris Meyers 1eb8501430 Allow connecting to websockets via api/websocket/
CI / molecule (--skip-tags=replicas) (push) Failing after 2m38s
CI / molecule (-t replicas) (push) Failing after 2m27s
CI / helm (push) Failing after 3m30s
CI / no-log (push) Successful in 11s
* Before, we just allowed websockets on <host>/websocket/. With this
  change, they can now come from <host>/api/websocket/
2024-02-13 10:20:50 -05:00
Christian Adams ecbb16960f Remove empty statusDescriptor because it fails validation (#1708) 2024-02-09 23:22:56 -05:00
Stéphane Bilqué 368f786244 add 'customSecrets' and 'customVolumes' values to Helm Chart to simplifies the creation of ressources for PoC (#1690) 2024-02-07 15:10:21 -05:00
Hao Liu e4fe1ee214 Update helm-chart README (#1704)
- fix link to doc
- add Caveats on upgrading existing installation
2024-02-07 14:32:19 -05:00
Hao Liu 0d1fa239a5 Fix api version in awxmeshingress-demo.yml (#1700)
Update awxmeshingress-demo.yml
2024-02-02 11:50:09 -05:00
Hao Liu 8a51fe9285 Add AWXMeshIngress description to CSV (#1703) 2024-02-02 10:58:57 -05:00
Hao Liu 33c64d5695 Add support annotation to CSV (#1702) 2024-02-01 15:01:15 -05:00
David O Neill a534c856db Fix Ansible operator url target and update to 1.34
CI / molecule (--skip-tags=replicas) (push) Failing after 2m15s
CI / molecule (-t replicas) (push) Failing after 1m38s
CI / helm (push) Failing after 21s
CI / no-log (push) Successful in 12s
The url has changed from
https://github.com/operator-framework/operator-sdk/releases
to
https://github.com/operator-framework/ansible-operator-plugins/releases
2024-01-29 13:44:48 +00:00
kurokobo acda72558f chore: update docsite link to not include version (#1693) 2024-01-24 19:16:49 +00:00
Hao Liu 9e2eb16b67 Update awxmeshingress sample 2024-01-18 15:38:18 -05:00
Hao Liu 6b02c2c53b Disable CI test for AWXMeshIngress
TODO: fix this
2024-01-18 15:38:18 -05:00
Hao Liu 0ca3f1a7c4 Update awx-manage commands for mesh ingress
and fix linting

Signed-off-by: Seth Foster <[email protected]>

Set correct protocol for external mesh ingress address

and fix linting error
2024-01-18 15:38:18 -05:00
Hao Liu 69474557eb Default ingress_type to route when on OpenShift
also rename route.yml.j2 to ingress.yml.j2 since we cover more than just route now
2024-01-18 15:38:18 -05:00
Hao Liu 48e3a96305 Add a simple awxmeshingress demo 2024-01-18 15:38:18 -05:00
kurokobo da7e227f71 Add ingress and ingressroutetcp for awxmeshingress (#1646)
* fix: correct port number for internal receptor address
* feat: add support for ingress for awxmeshingress cr
* feat: add support for ingressroutetcp (for traefik) for awxmeshingress cr
2024-01-18 15:38:18 -05:00
Hao Liu 98d5ac126d Create placeholder sample for awxmeshingress to allow bundle build 2024-01-18 15:38:18 -05:00
Hao Liu cb5db01406 Add finalizer to deprovision ingress instance 2024-01-18 15:38:18 -05:00
Hao Liu 494384c1d7 Fix receptor port when going through route 2024-01-18 15:38:18 -05:00
Hao Liu 34c2e48e0a Fix bug where external_ipaddress is required
external_ipaddress is optional and we should be able to deal with missing external_ipaddress with no error
2024-01-18 15:38:18 -05:00
Hao Liu 122995fda7 Add owner ref on AWXMeshIngress to AWX
This way when AWX is deleted associated AWXMeshIngress will all be deleted as well
2024-01-18 15:38:18 -05:00
Seth Foster 9761c78fe9 Update add_receptor_address command
- add --is_internal and --peers_from_control_nodes
to indicate the address is internal

Signed-off-by: Seth Foster <[email protected]>
2024-01-18 15:38:18 -05:00
Seth Foster 062c7153c6 Use deployment instead of statefulset
When pod loses connection with k8s api server,
a statefulset can take a while (5 minutes) before
it is rescheduled. Deployments quicker turnaround
in this situation, which should help mesh
stability.

Signed-off-by: Seth Foster <[email protected]>
2024-01-18 15:38:18 -05:00
Seth Foster 6ef4aed024 Provision instance and add receptor address
The mesh role now calls
1. awx-manage provision instance to register the hop
node to the database
2. awx-manage add_receptor_address to register the
internal address
3. awx-manage add_receptor_address to register the
external address (to be used by remote nodes)

CRD expanded to include external_ipaddress and
external_hostname

external_ipaddress is added as ipaddress in the
hop node certificate

external_hostname is added as dnsname in the
hop node certificate

the mesh role now checks for is_openshift and
only creates a Route if true. Otherwise it
will use external_hostname set in the spec
file in place of Route name.

Signed-off-by: Seth Foster <[email protected]>
2024-01-18 15:38:18 -05:00
Hao Liu 3fe42ed4b9 Removing sample awxmeshingress to fix CI
sample are used in CI for validation test

in current implementation we only support openshift route this will not work on kind clusters correctly and having the sample is causing CI failure
2024-01-18 15:38:18 -05:00
Hao Liu 2ff1d35b6d Update awxmeshingress sample 2024-01-18 15:38:18 -05:00
Hao Liu d3934d9e08 Able to deploy mesh ingress node
TODO: register instance after creation

dependent on API/CLI change
2024-01-18 15:38:18 -05:00
Hao Liu 3c8ce3718a Scaffold AWXMeshIngress 2024-01-18 15:38:18 -05:00
Hao Liu 66f03c3c16 Adopt LISTENER_DATABASES setting (#1687)
Related to https://github.com/ansible/awx/pull/14755

move TCP keepalive to pg_listener specific db setting
2024-01-17 13:47:35 -05:00
7e2c2bf92c multi-architecture builds and publish (#1681)
* Add multi-arch image builds to makefile
* A default set of platforms is specified and will build those if var `PLATFORMS` is not specified on the CLI
* Builds containers and stores @ghcr with tag that is git commit.
* Pushes the image to quay.io/ansible with tag devel.
* Update Promote to use single build point and the multi-arch manifest
   - Pulls the complete manifest containing all architectures that matches the version from ghcr
   - Tag manifest with the specified version and publish to quay.io
   - Tag manifest as 'latest' and publish to quay.io

Author: jon-nfc
Co-authored-by: Christian M. Adams <[email protected]>
Co-authored-by: TheRealHaoLiu
2024-01-16 17:00:24 -05:00
TVo 7b95f03a30 Updated the "index" file to include "Adding execution nodes" section. (#1684) 2024-01-15 15:04:25 -07:00
TVoandSeth Foster b0cb1cc07d Corrected syntax on xref to fix build failures. (#1683)
* Corrected syntax on xref to fix build failures.

* Update docs/user-guide/advanced-configuration/containers-resource-requirements.md

Co-authored-by: Seth Foster <[email protected]>
2024-01-15 19:26:42 +00:00
TVo 5be4c13016 Moved Adding Execution Nodes to its own section. (#1678)
* Moved Adding Execution Nodes to its own section.

* Moved Adding Execution Nodes to its own section.
2024-01-09 08:30:29 -07:00
07427be0b7 Allow multiple ingress hosts to be defined when using ingress (#1377)
* Replace api version for deployment kind to apps/v1

* Add new multiple ingress spec and deprecate hostname and ingress_tls_secret

* Manage new ingress_hosts.tls_secret backup separately

* Fix ci molecule lint warnings and error

* Fix documentation

* Fix ingress_hosts tls_secret key being optional

* Remove fieldDependency:ingress_type:Ingress for Ingress Hosts

* Fix scenario when neither hostname or ingress_hosts is defined

---------

Co-authored-by: Guillaume Lefevre <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
Co-authored-by: Christian Adams <[email protected]>
2024-01-05 10:15:04 -05:00
Florian SeyandFlorian Sey c23bc68900 Fix typo in contributing guidelines (#1677)
Co-authored-by: Florian Sey <[email protected]>
2024-01-03 15:53:35 -05:00
Christian Adams 582701d949 Refactor to resolve the linter warnings on PRs (#1668)
CI / molecule (--skip-tags=replicas) (push) Failing after 5m3s
CI / molecule (-t replicas) (push) Failing after 4m8s
CI / helm (push) Failing after 6m26s
CI / no-log (push) Successful in 11s
2023-12-14 09:29:35 -05:00
David Gries b6b3b6c0ab add 'extraDeploy' value to Helm Chart to allow deploying additional r… (#1640)
* add 'extraDeploy' value to Helm Chart to allow deploying additional resources
2023-12-13 14:43:30 -05:00
Hao Liu 25a6c3c48a Remove unnessary chmod and chown for db dump (#1667)
Based on https://github.com/ansible/awx-operator/pull/1602

Fixes https://github.com/ansible/awx-operator/issues/1590
2023-12-13 19:28:23 +00:00
Akira Yokochi c67289d2cf Fix link for Assigning AWX pods to specific nodes (#1656)
* Fix link for Assigning AWX pods to specific nodes

* fix word
2023-12-13 19:22:19 +00:00
Christian Adams d0c7f343b2 Fix PG Restore Force Drop DB flag (#1665)
- Previously, if the flag was set to true, the bash conditional failed
  because the boolean was not correctly interpreted.
- Use pg_restore return code to determine if the task should be marked as failed

Signed-off-by: Christian M. Adams <[email protected]>
2023-12-08 16:38:47 -05:00
David Gries ef17865f12 Update deprecated collections path variable (#1648)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m19s
CI / molecule (-t replicas) (push) Failing after 4m10s
CI / helm (push) Failing after 6m48s
CI / no-log (push) Successful in 22s
remove deprecated 'ANSIBLE_COLLECTIONS_PATHS' variable
2023-12-06 19:29:39 +00:00
Dayne Benn d5fd5d3819 Update upgrading.md (#1660) 2023-12-05 19:59:39 +00:00
Christian Adams a61ed18147 Always check and wait for a restore pg_restore to finish (#1652) 2023-12-01 16:18:23 -05:00
Christian Adams e3e3da0e0e Adding in Kind specific install docs (#1643) 2023-12-01 11:42:23 -05:00
Christian Adams 1470779b8f Bump Ansible Operator SDK version to 1.32.0 for OS updates (#1651)
- pick up security updates when building the operator container
2023-12-01 10:00:58 -05:00
Laurent Indermühle 400df47678 Enhance documentation for basic install (#1621)
- Describe checking out the tag to deploy in basic install instructions
- Also, the repo already contains a awx-demo.yml file but the doc reference awx-demo.yaml with en extra a. I remove this road block for newcomers by using same 'yml' extension everywhere.
2023-11-29 19:32:38 +00:00
Hao Liu 0f0ff32bf6 Add option to force drop database before restore (#1639) 2023-11-27 18:52:07 +00:00
ImedandImed Aouidene a9245454a4 Remove reference to cluster.local (#1566)
Co-authored-by: Imed Aouidene <[email protected]>
2023-11-27 16:26:24 +00:00
Gene Tomilko bba8b8e2b5 Update service.yaml.j2 (#1641)
fix loadbalancerip
2023-11-27 10:33:00 -05:00
Klaus Mueller 93c5e4a0c3 awx-operator-controller-manager reduce limit to 30 times as much as request (#1575) 2023-11-22 22:23:41 +00:00
Sandra McCann 06c0dd96d0 Remove TOC and add link to published docs (#1526)
CI / molecule (--skip-tags=replicas) (push) Failing after 3m29s
CI / molecule (-t replicas) (push) Failing after 2m36s
CI / helm (push) Failing after 3m9s
CI / no-log (push) Successful in 18s
AWX Operator docs are now published online so removing most of the README and adding a pointer to the new docsite.
2023-11-20 23:22:29 +00:00
Hao Liu e6b11084db Omit storage resource limit if empty (#1637)
We discovered some weird behavior observed on later Kubernetes version (OCP 4.12+)

For some reason why we apply the templates postgres resource with

```
postgres_storage_requirements:
  limit: {}
  requests:
    storage: <x>Gi
```

the `Create Database if no database is specified` task that does the k8s apply will always think the resource is "changed" and proceed to cycle the task and web pod

This resulted in AWX pods being continuously restarted

Update postgres.yaml.j2
2023-11-14 13:41:30 -06:00
romankuzmikandRoman Kuzmik 669fe1d253 1586: awx-operator restore from PVC is not working (#1603)
Co-authored-by: Roman Kuzmik <[email protected]>
2023-11-09 09:39:27 -05:00
Hao Liu e4cfa2f809 Fix operator-hub publishing automation (#1630)
Rename TAG_NAME to VERSION so it's no longer ambiguous when running hack/publish-to-operator-hub.sh

Checkout awx-operator at VERSION with fetch-depth=0 so that `make print-PREV_VERSION` will be able to actually find previous tag
2023-11-08 22:04:28 +00:00
Christian AdamsandHao Liu 7251961bcc Add ability to mount custom volumes in the postgres pod (#1626)
* Add ability to mount custom volumes in the postgres pod
* Fix indentation for postgres_extra_volumes

Signed-off-by: Christian M. Adams <[email protected]>
Co-authored-by: Hao Liu <[email protected]>
2023-11-08 15:44:30 -05:00
Hao Liu 3a5fbb0b06 Fix PREV_VERSION variable in Makefile - again (#1628)
Note to self: stop multi-tasking
2023-11-08 15:06:17 -05:00
Hao Liu a69ca7f8b5 Fix PRE_VERSION in Makefile (#1625)
* Fix make print-PREV_VERSION

* Use latest Makefile while running operator-hub publish
2023-11-08 16:40:24 +00:00
Hao Liu 0fb252b6e4 Fix operator-hub release CI when triggering from release (#1623)
Fix operator-hub release CI

When triggering from release default values for input is not accessible
2023-11-08 09:22:27 -05:00
Christian Adams 718e5cfcb9 Add sample AWX CR with resource limits for environments with Resource… (#1554)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m58s
CI / molecule (-t replicas) (push) Failing after 2m36s
CI / helm (push) Failing after 3m29s
CI / no-log (push) Successful in 17s
Add sample AWX CR with resource limits for environments with ResourceQuotas
2023-11-02 12:54:15 -04:00
Hao Liu a8153d5ffb Automate publishing to automation hub (#1616)
* Automate awx-operator publishing on operatorhub

* Use scripts from workflow branch
Previously it will use scripts from the release tag to do the release
If we have to fix up the scripts for any reason we would have to retag
This will allow us to modify the publishing script without having to retag the release.

NOTE: the commit in this PR was accidentally pushed to `devel` directly... merging this PR just for the record.
2023-10-26 11:27:49 -04:00
Hao Liu 7b0a68c2f4 Use scripts from workflow branch
Previously it will use scripts from the release tag to do the release

If we have to fix up the scripts for any reason we would have to retag

This will allow us to modify the publishing script without having to retag the release.
2023-10-25 15:46:35 -04:00
Hao Liu 1c89044be4 automate awx-operator publishing on operatorhub 2023-10-25 15:27:18 -04:00
Seth Foster 15ed13dd8d Fix supported_pg_version (#1614)
Signed-off-by: Seth Foster <[email protected]>
2023-10-25 12:47:24 -04:00
Christian Adams f2ad70678c Bump kube-rbac-proxy image to v0.15.0 (#1615) 2023-10-25 12:22:10 -04:00
dependabot[bot] 2ec77f1e7e Bump pillow from 9.5.0 to 10.0.1 in /docs (#1608)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 15:28:54 -04:00
Hao Liu aa7d0b9918 Fix promote workflow (#1613) 2023-10-24 15:14:00 -04:00
Hao Liu 38209f9720 Add workflow_dispatch to promote workflow (#1612) 2023-10-24 15:10:08 -04:00
Hao Liu 0ba4feaf7a Revert "Stage and promote operator catalog and bundle (#1598)" (#1611) 2023-10-24 14:55:42 -04:00
Hao Liu d4c1fda066 Stage and promote operator catalog and bundle (#1598)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m16s
CI / molecule (-t replicas) (push) Failing after 2m10s
CI / helm (push) Failing after 3m39s
CI / no-log (push) Successful in 18s
2023-10-24 13:06:45 -04:00
Christian Adams 0d97183bbf Hardcode the link for the operatorhub publish script (#1609) 2023-10-23 15:13:32 -04:00
Hao Liu 293f0158e0 Fix operator-hub publish script on mac (#1584) 2023-10-19 14:45:21 +00:00
Hao Liu bb30b3b9fe Fix spacing for csv file (#1601) 2023-10-18 18:38:32 +00:00
Chris 39bebe64ba Fix task deployment indention (#1596) (#1597) 2023-10-17 17:13:44 -04:00
Hao Liu 5bd84b3d3e Install operator-sdk if needed (#1600) 2023-10-17 20:19:29 +00:00
Christian Adams 76e315d191 Change supported OCP range when publishing to OperatorHub (#1599) 2023-10-17 16:03:54 -04:00
Hao Liu dd022258b5 Remove mailing list from getting involved (#1592) 2023-10-13 17:41:33 +00:00
Hao Liu 019fa3d356 Add background keepalive to awx-manage migrate (#1589) 2023-10-13 09:33:27 -04:00
Preston Alvarado 4a968aa605 docfix - Secret Key Configuration (#1585) 2023-10-11 18:32:37 +00:00
Hao Liu 92639c1e89 Adding keepalive while doing pg_dump (#1580)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m19s
CI / molecule (-t replicas) (push) Failing after 2m4s
CI / helm (push) Failing after 3m57s
CI / no-log (push) Successful in 15s
2023-10-10 13:08:51 -04:00
kurokobo a7cfbe23da fix: correct label selector to find task pod (#1573) 2023-10-03 14:08:54 -04:00
kurokobo 16a2b590d6 fix: change type for precreate_partition_hours from string to integer (#1571) 2023-10-03 12:10:40 -04:00
rakesh561andChristian M. Adams 8518e0d1c7 Allow ability to set security context for postgres deployment (#1517)
- Added docs for securityContext 
- enabled web securityContext configuration

Co-authored-by: Christian M. Adams <[email protected]>
2023-09-27 18:05:46 -04:00
Jeff Smith 6bc101af3e Bump ansible-operator to v1.31.0 (#1550) 2023-09-27 15:31:10 -04:00
jessicamack 31e1914db6 Pre-create event table partitions before db backup in operator (#1443)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m11s
CI / molecule (-t replicas) (push) Failing after 2m22s
CI / helm (push) Failing after 2m58s
CI / no-log (push) Successful in 16s
Signed-off-by: jessicamack <[email protected]>
<[email protected]>
2023-09-26 10:20:12 -04:00
Hao Liu aee1b464ed Update how to get involved (#1564) 2023-09-20 18:31:13 +00:00
ImedandImed Aouidene 61921d40ed Added pattern and max-length to secret names (#1549)
Co-authored-by: Imed Aouidene <[email protected]>
2023-09-20 14:24:01 -04:00
Christian Adams b5f2c19470 Add docs for publishing new operator versions to OperatorHub (#1557) 2023-09-13 16:28:11 -04:00
Christian Adams 8d91a67078 Ensure that web and task deployments scale down for upgrades (#1522)
CI / molecule (--skip-tags=replicas) (push) Failing after 2m45s
CI / molecule (-t replicas) (push) Failing after 2m28s
CI / helm (push) Failing after 2m55s
CI / no-log (push) Successful in 15s
2023-09-06 18:44:49 +00:00
ImedandImed Aouidene 3df613346c Fix no-log.md link location (#1548)
Co-authored-by: Imed Aouidene <[email protected]>
2023-09-06 18:31:42 +00:00
Rick Elrod b559e836e4 Fix CI warnings (yamllint and GitHub Actions) (#1547)
- Fix indentation on one of the newer molecule files.
- Update to actions/checkout@v3 and actions/setup-python@v4 and helm/[email protected].


Signed-off-by: Rick Elrod <[email protected]>
2023-09-06 13:15:31 -05:00
Seth Foster ea5fb823f9 Fix minikube link location (#1546) 2023-08-30 13:21:08 -04: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 22a05e8887 Deployment name should be referenced, not the restore object name (#1543) 2023-08-29 14:40:53 -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
Hao Liu c949d6e58d Wait for termination grace period when scaling down the deployments (#1537) 2023-08-28 18:37:45 -04:00
Hao Liu 0e0f413e82 Revert "Switch to using the sclorg redis image for consistency (#1531)" (#1536) 2023-08-28 20:50:00 +00:00
chillTschill 7935873746 Fixes #1039, naming of clusterscoped resources (#1159) 2023-08-25 22:56:36 +00:00
David Luong a57b9e0475 Changed replica from string to int for default (#1534) 2023-08-25 18:33:47 -04:00
Christian Adams 39eee1370b Add script to publish awx-operator to operator hub (#1528) 2023-08-24 21:43:48 -04:00
Christian Adams 48dcb08c78 Switch to using the sclorg redis image for consistency (#1531) 2023-08-24 21:38:55 -04:00
Sandra McCann d60fddebca Add readthe docs scaffolding (#1515) 2023-08-17 12:01:06 -04:00
Seth Foster ffd1a4b2ab Remove broken installation link (#1523) 2023-08-16 16:25:18 +00:00
Christian Adams 8391ed3501 Add UI Params for db_management_pod_node_selector and labels (#1465)
CI / molecule (--skip-tags=replicas) (push) Failing after 1m58s
CI / molecule (-t replicas) (push) Failing after 1m48s
CI / helm (push) Failing after 5m21s
CI / no-log (push) Successful in 18s
2023-08-03 22:02:36 -04:00
Christian Adams 3b2a218419 Add note about how to find docs after building the doc site (#1512) 2023-08-03 15:50:00 -04:00
Sandra McCann 71362dd3d4 Add new docs files to mkdocs (#1507) 2023-08-03 15:13:11 -04:00
Christian Adams 3188cd2889 Add Table of Contents for nested doc files (#1509) 2023-08-03 08:14:49 -04:00
Christian Adams bf3965eac7 Add Table of Contents for nested doc files (#1508) 2023-08-02 16:24:15 -04:00
Sandra McCann 7953d424f0 update readme TOC (#1504) 2023-08-02 13:58:02 -04:00
Oluchi Nwenyi dc2599b0b9 Docs: added contributing segment to docs (#1483)
CI / molecule (--skip-tags=replicas) (push) Failing after 6m5s
CI / molecule (-t replicas) (push) Failing after 2m10s
CI / helm (push) Failing after 34s
CI / no-log (push) Successful in 12s
2023-07-27 15:07:30 -04:00
Oluchi Nwenyi 93a7878ab7 Docs: moved uninstall segment from readme (#1482) 2023-07-27 14:31:21 -04:00
Oluchi Nwenyi 3a1b763522 Docs: moved upgrade segment from readme (#1481) 2023-07-27 11:10:33 -04:00
Christian Adams fcc25b1835 Set a default container for web & task deployments (#1500) 2023-07-26 18:48:44 -04:00
Oluchi Nwenyi 470c7c392b Docs: moved user guide segment from readme (#1480) 2023-07-26 17:08:20 -04:00
Desmond Obisi 6e487ed29e Docs: moved installation from readme to docs folder (#1478) 2023-07-26 15:52:43 -04:00
Desmond ObisiandSandra McCann 7f4dfbc0a1 Docs: moved introduction from readme to docs folder (#1477)
Co-authored-by: Sandra McCann <[email protected]>
2023-07-25 17:05:47 -04:00
Rick Elrod c9ab99385a Allow {web_,task_,}replicas to be 0 and split out molecule tests (#1468)
Signed-off-by: Rick Elrod <[email protected]>
2023-07-18 17:07:55 -04:00
Elijah DeLee ef7703563b add uwsgi config as configmap with vars (#1487) 2023-07-17 18:26:39 -04:00
Rick Elrod 7f6ed97fd5 [CI] Drop docker install workaround (#1463)
Signed-off-by: Rick Elrod <[email protected]>
2023-07-17 15:17:46 -05:00
Rick Elrod 45f7545f41 Pin Cython for tests, so that PyYAML can build (#1492)
See: https://github.com/yaml/pyyaml/issues/601

Signed-off-by: Rick Elrod <[email protected]>
2023-07-17 11:39:11 -05:00
Elijah DeLee 4b8f371095 Update README.md to use make deploy (#1488) 2023-07-14 12:41:36 -04:00
Seth Foster 822b3a439f Add receptor_log_level (#1444) 2023-07-10 11:49:58 -04:00
rakesh561 cfb5048f85 There was a typo in the CRD for the ephemeral storage which was ephemeral_storage instead of ephemeral-storage (#1476) 2023-07-05 14:40:47 -04:00
rakesh561 43c1f396c3 Updated image pull policy for backup and restore policy as variable (#1473) 2023-07-05 14:39:43 -04:00
Chi Cuong HA cbdbeb790b Fix redirect port when route_tls_termination_mechanism: passthrough (#1475)
Fixes #1474
2023-06-30 16:06:55 -05:00
rakesh561 d61a01321f Allow ability to define requests and limits for ephemeral storage. (#1466) 2023-06-29 23:24:52 -04:00
Uros Bajzelj 3afe1df555 Enable configuration of rsyslog environmental variables, volume mounts, and entrypoints (#1467) 2023-06-29 22:38:24 -04:00
BhattacharjeeSutapaandDon Naro b18d59f118 Add mkdocs scaffolding (#1363)
Co-authored-by: Don Naro <[email protected]>
2023-06-28 11:15:05 -04:00
lohandChristian Adams 1d72a97ac8 Add doc note about extra_settings being read-only in AWX UI
Co-authored-by: Christian Adams <[email protected]>
2023-06-23 15:14:06 -04:00
rakesh561 a8d2831b1c Update code with capability to set the init container resources instead of using web or task container resources (#1439) 2023-06-23 18:09:09 +00:00
Stanislav Zaprudskiy 213c1bebc4 Do not cause web deployment restart on pre-stop scripts changes (#1458) 2023-06-23 11:25:58 -04:00
Hao Liu ca6666d271 Fix failure in CI while creating kind cluster (#1462) 2023-06-23 10:18:58 -04:00
soumyadeep-paul-ibmandChristian Adams 56d1966397 Update manager_auth_proxy_patch.yaml (#1438)
Co-authored-by: Christian Adams <[email protected]>
2023-06-21 18:30:17 +00:00
fcc09673cc Add db_management_pod_node_selector for specifying nodeSelect for backup/restore mgmt pod (#1434)
Co-authored-by: Hao Liu <[email protected]>
Co-authored-by: Jesse Wattenbarger <[email protected]>
2023-06-21 10:46:29 -04:00
rakesh561andStanislav Zaprudskiy b1655479d2 Updated task.yaml.j2 rsyslog container to have preStop hook (#1422)
Co-authored-by: Stanislav Zaprudskiy <[email protected]>
2023-06-09 16:33:31 -04:00
Hao Liu a5e29aefec Relocate receptor cert and key file location (#1442) 2023-06-09 14:19:04 -04:00
dale-mittleman 4d20079cfe Fix rsyslog container resources in task deployment template (#1426) 2023-05-19 13:05:37 -04:00
John Westcott IV 645f3a7cf8 Merge pull request #1420 from john-westcott-iv/change_helm_release
Changing helm-release url setting from global to local
2023-05-18 08:31:10 -04:00
john-westcott-iv b65457a056 Changing url setting from global to local 2023-05-17 16:23:14 -04:00
Christian Adams 72bf56946f Fix helm release push with HTTPS (#1419) 2023-05-17 15:38:35 -04:00
Seth Foster a62487b58b Merge pull request #1418 from fosterseth/fix_rsyslog_resources
Fix templating error when bundle_ca_crt is present
2023-05-17 15:19:20 -04:00
Seth Foster aa78813d73 Rsyslog resources wrong location 2023-05-17 15:02:20 -04:00
Christian Adams a08c9104a9 Add GHA for re-publishing helm chart when necessary & for debugging (#1417) 2023-05-17 14:27:44 -04:00
Shane McDonald 5da4b697f1 Merge pull request #1416 from laiminhtrung1997/remove-redundant-slashes
Remove redundant slash in path to template
2023-05-17 14:15:35 -04:00
laiminhtrung1997 f99a83c137 Remove redundant slashes. 2023-05-17 22:54:52 +07:00
rakesh561 721d6814ca Added capability to set the rsyslog container resources (#1410)
* Update awx.ansible.com_awxs.yaml with rsyslog resource containers
* Update awx-operator.clusterserviceversion.yaml with x-descriptors
* Add default values in main.yml
* Template resource_requirements in web.yaml.j2 and task.yaml.j2
2023-05-16 21:28:36 -04:00
Jeff SmithandJeffery Smith 866acb3d9c Bump ansible-operator to v1.28.1 (#1408)
This fixes [CVE-2022-41723](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-41723)

Co-authored-by: Jeffery Smith <[email protected]>
2023-05-16 18:06:08 -04:00
Hao Liu 94dc52d224 Merge pull request #1393 from ansible/feature_keepalive
Add ability to configure Postgres keepalive settings
2023-05-15 12:26:07 -04:00
Christian Adams c0cd78899a Add Docs for customizing the favicon for AWX (#1406) 2023-05-10 17:05:04 -04:00
3b54fa8675 Host aliases (#1373)
* feat: add HostAliases to web/task containers (fixes #646)
* feat: add HostAliases to web/task containers
* Make host_aliases display in the Operator UI
* Add default value for host_aliases and add to web deployment template

Co-authored-by: zhangpeng.zong <[email protected]>
Co-authored-by: Dimitri Savineau <[email protected]>
2023-05-10 14:45:48 -04:00
4a869998d1 Add ability to configure postgres keepalives settings
Co-Authored-By: Gabriel Muniz <[email protected]>
Co-Authored-By: Rick Elrod <[email protected]>
2023-05-09 14:56:20 -04:00
Christian Adams bc044431ab Fix so that the index.yaml changes are pushed (#1402) 2023-05-08 15:24:02 -04:00
Hao Liu 4fe482b77b Unpin ubuntu version for feature branch CI build (#1400) (#1401) 2023-05-08 14:42:35 -04:00
Desmond Obisi 194340688d Create doc-proposal.md to capture the new doc proposal (#1379)
This commit contains the addition of the markdown file for the new awx-operator doc proposal
2023-05-06 01:02:35 +00:00
Wilton Rodrigues b517b0a2a6 Fix invalid LDAP configuration example in README.md (#1397)
Commit 3d849d9179 Removed the necessary parentheses
2023-05-05 21:16:01 +00:00
Seth Foster 1dc56803e8 Set receptor log level to info (#1399) 2023-05-05 18:20:20 +00:00
Christian Adams 85da1aa1f3 Change storage class display type to dropdown (#1398) 2023-05-05 14:19:32 -04:00
Christian Adams 6378836706 Add postgres_storage_class to UI form & fix PG Storage requirements display (#1395) 2023-05-05 12:32:33 -04:00
Christian Adams e829dafbd2 Fix molecule test by pinning community.docker for requests issue (#1396) 2023-05-04 18:30:47 -04:00
Christian Adams 1023718b87 Allow configuration of resource requirements for init containers (#1392)
- In some use cases, limits must be set for every container in a
    cluster. To address this, we will use the task and web resource
requirements for the initContainers where applicable.
2023-05-03 17:41:01 -04:00
Seth Foster 4a5141933c Merge pull request #1388 from cilq/patch-1
Fix variable name for loadbalancerip in template.
2023-05-03 14:07:44 -04:00
Shane McDonald 084841f549 Merge pull request #1389 from patrickdappollonio/devel
Update Makefile
2023-05-02 12:43:35 -04:00
Patrick D'appollonio 76ab4a8342 Update Makefile 2023-05-02 11:53:13 -04:00
Rick Elrod 2d6aa5815f [ci] pin ansible-compat for molecule
https://github.com/ansible-community/molecule/issues/3903

Signed-off-by: Rick Elrod <[email protected]>
2023-05-02 09:47:56 -05:00
Dimitri Savineau d69b57c014 web: Use sha1 filter instead of md5 (#1386)
This was fixed in 6cae8df but the task/web split rebase didn't apply this
to the web deployment.
This prevents to deploy the operator when FIPS is enabled.

{"msg": "An unhandled exception occurred while running the lookup plugin
'template'. Error was a <class 'ValueError'>, original message:
[digital envelope routines: EVP_DigestInit_ex] disabled for FIPS"}

Signed-off-by: Dimitri Savineau <[email protected]>
2023-05-02 10:19:21 -04:00
André Liebigt 562a171de6 Fix variable name for loadbalancerip in template.
The template now checks the existence of the correct variable so that it actually works.
2023-05-02 13:53:06 +02:00
Jason Goldfine-Middleton 2118c6f49c Fix typo in rsyslog var
Rename all references: ryslog_args -> rsyslog_args
2023-04-28 10:49:49 -05:00
Seth Foster 9c759bfe88 bump kustomize v4.5.7 to v5.0.1 (#1357) 2023-04-21 14:49:42 -04:00
Christian Adams d0205f4e5e Add docs for how to run molecule tests with kind (#1375)
- test-local docker scenario was removed in https://github.com/ansible/awx-operator/commit/9a54ae293741cff695579834c86f3b4d17c43d36
2023-04-20 15:47:36 -04:00
Lukas Magauerandlumarel d914edf3e0 The ingress resulted in a double slash, if there is are slashes at the end of the ingress_path variable (#1374)
Co-authored-by: lumarel <[email protected]>
2023-04-19 23:35:36 -04:00
John Westcott IV be4fd1364c Merge pull request #1371 from john-westcott-iv/another-helm-fix
Changing helm-release again
2023-04-19 17:26:43 -04:00
Christian Adams 599b1e387d Fix linter warnings on PRs (#1372) 2023-04-19 18:36:29 +00:00
john-westcott-iv 732ff9c02c Changing helm-release again 2023-04-19 12:25:14 -04:00
Hao Liu d0e30a6878 Merge pull request #1368 from tanganellilore/fix_promote
fix chart package path on helm-release playbook
2023-04-19 11:31:57 -04:00
Shane McDonald a213b60008 Merge pull request #1369 from sdx23/patch-1
Update README.md
2023-04-19 09:13:58 -04:00
sdx23 768327ea3b Update README.md
Adaptations to use kustomize implicitly via kubectl apply -k
2023-04-19 11:18:00 +02:00
Lorenzo Tanganelli 4908ecfd5d fix chart package path on hel-release playbook 2023-04-19 09:32:17 +02:00
Lila Yasin e1e97a1bbf Merge pull request #1351 from djyasin/1331_Add_support_to_specify_different_annotation_for_task_and_web_deployments
Add support to specify different annotation for the task and web deployments in AWX operator
2023-04-17 16:22:36 -04:00
Lila e54215863c Add ability to override annotations independently
- add web_annotations to override annotations for web pods
- add task_annotations to override annotations for task pods
2023-04-17 16:07:12 -04:00
Seth Foster 0c2f45569c Merge pull request #1358 from fosterseth/fix_development_mode
fix development mode
2023-04-13 11:10:37 -04:00
Seth Foster cde24806cf fix development mode 2023-04-12 19:31:15 -04:00
Christian Adams 5a3b2179bc Set securityContext.capabilities for kube-rbac-proxy container (#1354) 2023-04-12 14:55:57 -04:00
Lukas Magauerandlumarel faf51c8b24 Add websocket configuration for contour ingress (#1320)
Co-authored-by: lumarel <[email protected]>
2023-04-12 18:29:21 +00:00
Hao Liu 9bdbf4bacb Fix lint error (#1352)
Check warning on line 44 in roles/installer/defaults/main.yml
44:2 [comments] missing starting space in comment
2023-04-12 14:25:41 -04:00
d4015546db Fix helm release problem (attempt 3) (#1350)
fix helm release result in helm index containing incorrect download link

Co-authored-by: Christian Adams <[email protected]>
Co-authored-by: John Westcott IV <[email protected]>
2023-04-11 20:37:51 +00:00
Hao Liu 10df62ff7b Merge pull request #1349 from thedoubl3j/fix_task_tolerations
fix task deployment tolerations
2023-04-11 15:13:59 -04:00
thedoubl3j a2a35d0a40 remove to_nice_yaml from tolerations in the task deployment which caused in malformed yaml to be rendered for the task deployment 2023-04-11 14:26:51 -04:00
Hao Liu 4589e2849d Merge pull request #1333 from TheRealHaoLiu/fix-rsyslog-ca-cert
Add CA cert volume mount to rsyslog sidecar
2023-04-07 13:07:29 -04:00
Hao Liu 1456d24ff5 Merge pull request #1328 from thedoubl3j/fix_manual_projects
Add back project persistence so Manual projects SCM type have path
2023-04-07 13:06:56 -04:00
Hao Liu b5e630d0b5 Merge pull request #1342 from TheRealHaoLiu/fix-molecue-failure
Update CI test and fix awx-operator CI failure in awx repo
2023-04-07 12:59:02 -04:00
Hao Liu 4104e7d912 Update awx_test.yml
- rename awx_pod to awx_web_pod to better reflect intention
- update `awx_version` block to also validate awx_task_pod
- add get awx_task_pod in additional label check block (fix CI in awx repo which does not run the validate awx_version block)
- add assertion for awx_task_pod extra label
2023-04-07 12:42:22 -04:00
thedoubl3j 2f7297f5f5 revert project persistance so that manual projects have a default path
move chmod chgrp for projects_persistence to different init

default init container is the awx-ee because and unable to run command chgrp

moving it into a different init container

note this is not needed for openshift so this is conditional on is_k8s
2023-04-07 12:02:13 -04:00
Lila Yasin 073e6cff0a Merge pull request #1327 from djyasin/1315_Update-tests-to-validate-web-task
Updating awx_test.yml to respect both web and task deployments.
2023-04-07 10:51:02 -04:00
Lila 910f1eeb36 Updating awx_test.yml to respect both web and task deployments.
- Extracts label information from both web and task pods
- Asserts web and task pod labels are correct respectively
2023-04-07 10:24:02 -04:00
Hao Liu bba532e2e5 Merge pull request #1229 from manfuin/conditional-sslrootcert
Specify sslrootcert in database options conditionally (fixes #1215)
2023-04-05 14:18:05 -04:00
Hao Liu fee2289753 Add CA cert volume mount to rsyslog sidecar
fixes https://github.com/ansible/awx-operator/issues/1332
2023-04-05 13:40:38 -04:00
Hao Liu c5520d4c61 Merge pull request #1324 from TheRealHaoLiu/fix-supervisor-conf-file-inconsistancy
Fix supervisor conf file inconsistancy
2023-04-04 11:15:33 -04:00
Hao Liu 25e7f5a8f2 Fix supervisor conf file inconsistancy 2023-04-04 10:00:02 -04:00
Hao Liu d4e12dff8f Merge pull request #1316 from TheRealHaoLiu/tmp-fix-ci
Temporary fix for CI failure for web-task-split
2023-03-30 12:36:54 -04:00
Hao Liu c4d9970111 Update awx_test.yml 2023-03-30 12:35:24 -04:00
Hao Liu 34f48713a4 Merge pull request #1314 from TheRealHaoLiu/tmp-fix-label-test-failure
Temporary fix for label test failure
2023-03-30 11:50:00 -04:00
Hao Liu 8d2d44dc6d tmp fix for label test failure
validate label only for awx web container

TODO: make this validate both web and task container
2023-03-30 11:47:55 -04:00
Jake Jackson 2f59796caa Merge pull request #1218 from ansible/feature_web-task-split
Deploy web and task component in independent deployment
2023-03-30 10:38:34 -04:00
thedoubl3j 4a6d1855dc remove disktype key from example 2023-03-29 22:00:52 -04:00
Hao Liu cd3bfbef96 Rename SUPERVISOR_WEB_CONFIG_PATH
SUPERVISOR_WEB_CONFIG_PATH is used in the old deployment for task container to reach into the web container and restart services

this is no longer possible/needed after splitting the deployment

renaming SUPERVISOR_WEB_CONFIG_PATH to SUPERVISOR_CONFIG_PATH
and setting it to the supervisor file for the container

this can still be useful to help run `supervisorctl -c $SUPERVISOR_CONFIG_PATH`
2023-03-29 22:00:52 -04:00
Hao Liu 02328076e5 Update arg for launching web container
related to https://github.com/ansible/awx/pull/13777

make sure that the launch script name reflect the component that its launching
2023-03-29 22:00:52 -04:00
Lila 4bec3f7098 Removed extra space. 2023-03-29 22:00:52 -04:00
Lila b7e6987aec Removed errant quotes in main.yml. 2023-03-29 22:00:52 -04:00
Jake Jackson 7218e42771 [web/task split] fix scale down bug (#1295)
- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
2023-03-29 22:00:52 -04:00
Lila 25dfc97047 Updated task deployment to fix receptor certs issue.
Added the following volume mounts to the web container:
- receptor-work-signing
- receptor-ca
- work-public-key.pem
Also added these corresponding volumes to the web deployments:
- receptor-ca
- receptor-work-signing
2023-03-29 22:00:52 -04:00
Hao Liu 1106ef54ee add AWX_COMPONENT env var
for awx to be able to identify which component it is running in code
2023-03-29 22:00:52 -04:00
thedoubl3j 6fd5ca918b remove any reference to project persistance in web deployment 2023-03-29 22:00:52 -04:00
Hao Liu 942cce05e7 resolve merge error 2023-03-29 22:00:52 -04:00
Hao Liu c2f0c214eb rename tower_pod to awx_task_pod 2023-03-29 22:00:52 -04:00
Hao Liu a0fdf653fb enable web container to be restarted when configmap/secret change 2023-03-29 22:00:52 -04:00
thedoubl3j 5894a4ad25 remove old deployment during upgrade 2023-03-29 22:00:52 -04:00
thedoubl3j 3c0ea07a55 update documentation for the new fields added 2023-03-29 22:00:52 -04:00
Hao Liu 84b766ac40 update auto_upgrade logic (#1241)
update logic for determining if install.yml task should be run
to respect the auto_upgrade field in awx resource

conditions and expected behavior
```
  auto_upgrade   awx   awx-web   awx-task   run install.yml
 -------------- ----- --------- ---------- -----------------
  T              -     -         -          T
  F              T     -         -          F
  F              -     T         T          F
  F              -     T         F          T
  F              -     F         T          T
  F              -     F         F          T
```
2023-03-29 22:00:52 -04:00
jessicamack 41e84be0d3 added descriptors for new fields (#1238)
Signed-off-by: jessicamack <[email protected]>
2023-03-29 22:00:52 -04:00
Jake Jackson d40683cbb9 add topology constraint for each deployment (#1234) 2023-03-29 22:00:52 -04:00
Hao LiuandJake Jackson 918e487422 Add web and task replicas to the CRD (#1227)
add web_replicas and task_replicas

Co-Authored-By: Jake Jackson  <[email protected]>
2023-03-29 22:00:52 -04:00
Jake Jackson 6192cab653 fix affinity duplicate (#1225) 2023-03-29 22:00:52 -04:00
Jake Jackson c1bbd85ea9 add nodeSelector work (#1219) 2023-03-29 22:00:52 -04:00
Jake Jackson d9f3a428d4 [web/task split] split web and task deployment + a few supporting bits (#1189)
* first pass, still WIP, need tolerations etc

* add tolerations that don't work bc idk

* bug hunting

* local push, still a WIP

* affinity still needs testfor to_nice_yaml, tolerations logic is working

* fixed task deployment and affinity for both
2023-03-29 22:00:52 -04:00
Rick Elrod ebc040fe75 scale web/task replicas separately
This is a breaking change since 'replicas' is no longer used.

Signed-off-by: Rick Elrod <[email protected]>
2023-03-29 22:00:52 -04:00
Rick Elrod 12e51ad9ad add $MY_POD_IP back to web deployment
Signed-off-by: Rick Elrod <[email protected]>
2023-03-29 22:00:52 -04:00
Rick Elrod 6477468729 drop awx-web container from awx-task deployment
Signed-off-by: Rick Elrod <[email protected]>
2023-03-29 22:00:52 -04:00
Shane McDonald 19461fa86c Split web and task containers into separate deployments 2023-03-29 21:59:57 -04:00
Seth Foster 2b3fd833a3 Allow TLS 1.2 for Receptor connections (#1300)
- Required for FIPS environment where TLS 1.3 is
not supported
- TLS 1.3 can still be used if the nodes
both agree to use during handshake.
2023-03-29 19:19:40 -04:00
Guillaume LefevreandGuillaume Lefevre c76ad2cff1 Change ansible k8s_info tasks api_version for Deployment kind to apps/v1 (#1299)
Co-authored-by: Guillaume Lefevre <[email protected]>
2023-03-29 15:39:41 -04:00
John Westcott IV aa673de25d Merge pull request #1305 from john-westcott-iv/no_jmes
Modifying stage playbook to not need jmespath
2023-03-27 21:08:32 -04:00
John Westcott IV f1512e9405 Modifying stage playbook to not need jmespath 2023-03-27 20:56:56 -04:00
John Westcott IV d853e050cd Merge pull request #1304 from john-westcott-iv/fix_jmes_path
Adding jmespath to workflow for using json_query
2023-03-27 20:40:10 -04:00
John Westcott IV 9f0c5c8ba9 Adding jmespath to workflow for using json_query 2023-03-27 20:26:14 -04:00
John Westcott IV 1d34d86f32 Merge pull request #1303 from john-westcott-iv/fix-playbook
Making helm release playbook more idempotent
2023-03-27 16:18:56 -04:00
John Westcott IV 7164c412f0 Making helm release playbook more idempotent 2023-03-27 16:02:21 -04:00
John Westcott IV a8a05bb113 Merge pull request #1302 from john-westcott-iv/fix_release
Adding missing \ in promote workflow
2023-03-27 14:40:19 -04:00
John Westcott IV bf91f32f79 Adding missing \ in promote workflow 2023-03-27 14:28:18 -04:00
Andrii SalnikovandDimitri Savineau ef10b06be5 Update roles/installer/templates/settings/credentials.py.j2
Co-authored-by: Dimitri Savineau <[email protected]>
2023-03-23 22:31:39 +01:00
Dimitri Savineau 1e453aefd3 Merge pull request #1297 from dsavineau/restore_requires_deployment_name
restore: Set deployment_name as required
2023-03-23 11:14:32 -04:00
Dimitri Savineau 71b950c243 Merge pull request #1298 from dsavineau/fix_restore_backup_source_enum
restore: Fix enum value for backup_source
2023-03-23 11:14:13 -04:00
Dimitri Savineau b00137cc3e restore: Fix enum value for backup_source
The choice for backup_source are:
- Backup CR
- PVC

This current prevents to create an AWXRestore CR with the Backup CR value
from the OLM UI.

Error "Unsupported value: "Backup CR": supported values: "CR", "PVC"" for
field "spec.backup_source".

Signed-off-by: Dimitri Savineau <[email protected]>
2023-03-22 18:18:51 -04:00
Dimitri Savineau 2cc398d8d4 restore: Set deployment_name as required
The deployment_name from the AWXRestore CR doesn't requires to set a
value for this parameter.
That parameter is already required for the AWXBackup CR so it should be
the same for AWXRestore.

Creating an AWXRestore CR without deployment_name set results in a failure
during the Secrets restoration.

"reason":"FieldValueInvalid","message":"Invalid value: \\"-receptor-ca\\":
a lowercase RFC 1123 subdomain must consist of lower case alphanumeric
characters, \'-\' or \'.\', and must start and end with an alphanumeric
character (e.g. \'example.com\', regex used for validation is
\'[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\')"

Signed-off-by: Dimitri Savineau <[email protected]>
2023-03-22 17:59:49 -04:00
Joel 5c91bbd65e restore use k8s_cp module to read backup files (#1212) 2023-03-22 14:27:58 -04:00
Gene Tomilko 88b1a8c125 Add loadbalancerip (#1265)
* Add ability to configure loadbalancerip on service
* Add docs for configuring loadbalancerip
2023-03-22 18:27:17 +00:00
Christian Adams 6fd969633e Document the need for quotes on pg secret port value (#1288) 2023-03-22 14:17:40 -04:00
Christian Adams 9c788ba3bd Add more suggestions to Debugging doc (#1285) 2023-03-16 17:52:29 -04:00
Seth Foster c2fd14e39a Merge pull request #1281 from trippinnik/patch-1
Update README.md
2023-03-15 14:29:57 -04:00
Seth Foster 6513e93e7f Merge pull request #1287 from sugitk/patch-1
fixes #1286 expand client_max_body_size to 5Mb
2023-03-15 14:17:18 -04:00
Takashi Sugimura d0f4898aaa fix #1286 2023-03-15 08:20:16 +09:00
trippinnik 3d849d9179 Update README.md
documentation is incorrect for AUTH_LDAP_GROUP_TYPE and paramaters need to be noted with AUTH_LDAP_GROUP_TYPE_PARAMS
2023-03-09 09:46:46 -05:00
aurel333andAurelien Potin fe77f1deae Fix awx-manager-role bad match between some apiGroups and resources (#1262)
Co-authored-by: Aurelien Potin <[email protected]>
2023-03-08 16:24:03 -05:00
Hao Liu 9156909023 Merge pull request #1263 from rh-dluong/date-format
change date format to avoid :
2023-03-08 15:58:58 -05:00
Christian Adams 03e3b68eeb Helm Release: Need to use shell, not command for multi-line (#1280) 2023-03-08 15:55:30 -05:00
Ravi TejaandRaviTeja Buddabathuni 6cae8dfa32 fix: use sha1 instead of md5 to make the installer work in FIPS (#1260)
Co-authored-by: RaviTeja Buddabathuni (rbuddaba) <[email protected]>
2023-03-08 15:10:27 -05:00
Hao Liu b1ecc89759 Merge pull request #1274 from TheRealHaoLiu/feature-branch-build
Add github workflow for publishing feature branch images
2023-03-07 17:05:08 -05:00
Hao Liu bb85b31411 Add github workflow to publish feature branch img 2023-03-07 16:50:28 -05:00
Christian Adams 7e7c23e176 Fix helm-release task to work in ansible, not GHA env (#1267) 2023-03-06 15:25:04 -05:00
John Westcott IV 8442cc7ae8 Merge pull request #1268 from john-westcott-iv/ubuntu-change
Changing github actions from ubuntu-18 to ubuntu-latest
2023-03-06 15:06:02 -05:00
John Westcott IV 3faf76d7c9 Changing github actions from ubuntu-18 to ubuntu-latest
See https://github.com/actions/runner-images/issues/6002 for deprication warnings
2023-03-06 14:55:32 -05:00
David Luong 61ef5ef005 change date format to avoid : 2023-03-02 13:54:00 -05:00
Peter Hoffmann 86043361c6 Small fix/adjustment in README (#1257)
* Fix minor typo
2023-02-28 16:20:47 -05:00
Ravi TejaandRaviTeja Buddabathuni 06194960e9 Bump ansible operator SDK version to v1.26.0 (#1258)
Co-authored-by: RaviTeja Buddabathuni (rbuddaba) <[email protected]>
2023-02-28 15:45:02 -05:00
Hao Liu 46da413585 Merge pull request #1193 from stanislav-zaprudskiy/add_termination_grace_period_seconds
AWX: Add `termination_grace_period_seconds`
2023-02-28 15:37:51 -05:00
Hao Liu b5f255cf00 add nodeport_port to instantiate playbook (#1252) 2023-02-22 21:18:12 +00:00
Maxence Button f328b0adb6 Customization of the init_projects_container_image is now possible (#1248) 2023-02-22 15:05:23 -05:00
Shane McDonald 1bfd3b2028 Merge pull request #1201 from thedoubl3j/debugging_doc_update
Update Installer Debugging Documentation
2023-02-22 14:51:05 -05:00
Christian Adams edf01f009e Stage and push helm index where gitconfig is set (#1251) 2023-02-22 14:09:35 -05:00
Joel a3c28be98a [enhancement] restore postgres database if external db (#1211)
* restore postgres fix resolvable_db_host

set the resolvable_db_host ansible variable based on the db deployment
2023-02-22 13:56:38 -05:00
Stanislav Zaprudskiy 49d1f00dbd Do not keep web container running during termination
We could let the web container terminate as usual, as there are no
reasons to keep it running as it doesn't participate in
job control. Additionally, it stops receiving traffic with the beginning
of termination

> At the same time as the kubelet is starting graceful shutdown, the
> control plane removes that shutting-down Pod from EndpointSlice (and
> Endpoints) objects where these represent a Service with a configured
> selector

@ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination
2023-02-22 10:40:40 +01:00
Christian Adams 81939cb521 K8s cpu value example in README.md needs quotes to be valid (#1220) 2023-02-20 17:37:53 -05:00
Shane McDonald 6b10a8141c Merge pull request #1231 from rooftopcellist/auto-assign-nodeport 2023-02-09 20:27:26 -05:00
Christian M. Adams 1ef1f00b3d Auto-assign NodePort port by default rather than hardcoding a default value
- previously, there was no way to auto-assign a port by default
   which led to conflicts with other deployments at times
 - nodeport_port param can still be used to specify a port if desired
2023-02-09 19:49:46 -05:00
Andrii Salnikov ce48812921 add sslrootcert to database options conditionally (fixes #1215) 2023-02-09 00:57:19 +01:00
Stanislav Zaprudskiy 336ea58a0a AWX: Add termination_grace_period_seconds 2023-02-07 16:33:00 +01:00
Stanislav Zaprudskiy f042cb3d00 Fix lint warnings 2023-02-07 16:31:26 +01:00
Stanislav Zaprudskiy 94d68bf382 Make Deployment to be rolled out on CM and Secrets changes
With the previous approach, not all associated (mounted) CM/Secrets
changes caused the Deployment to be rolled out, but also the Deployment
could have been rolled out unnecessary during e.g. Ingress or Service
changes (which do not require Pod restarts).

Previously existing Pod removal (state: absent) was not complete as
other pods continued to exist, but also is not needed with this commit
change due to added Pods annotations.

The added Deployment Pod annotations now cause the new ReplicaSet
version to be rolled out, effectively causing replacement of the
previously existing Pods in accordance with the deployment `strategy`
(https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#deploymentstrategy-v1-apps,
`RollingUpdate`) whenever there is a change in the associated CMs or
Secrets referenced in annotations. This implementation is quite standard
and widely used for Helm workflows -
https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
2023-02-07 11:58:47 +01:00
Stanislav Zaprudskiy b3a74362af Make AWX Pod variable to be calculated respecting creationTimestamp and deletionTimestamp
Do not consider Pods marked for deletion when calculating tower_pod to
address replicas scale down case - where normally Pods spawned recently
are being taken for removal. As well as the case when operator kicked
off but some old replicas are still terminating.

Respect `creationTimestamp` so to make sure that the newest Pod is taken
after Deployment application, in which case multiple RS Pods (from old
RS and new RS) could be running simultaneously while the rollout is
happening.
2023-02-07 11:47:49 +01:00
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
Christian Adams 234a10d185 Add a more descriptive AWX CRD description (#1208) 2023-01-31 10:50:12 -05:00
Christian Adams e0fa1610ca Fix minor typos in test task names (#1209) 2023-01-31 00:05:37 +00: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
Christian Adams d26a6bf641 Fix minor helm make target syntax error (#1206) 2023-01-27 09:56:40 -05:00
janorn 8d6db0934f Fix helm chart URLs (#1204) 2023-01-27 09:32:46 -05:00
John Westcott IV c1b2e73123 Merge pull request #1202 from john-westcott-iv/security_requested_change
Nominal change to the pr body check
2023-01-25 17:29:50 -05:00
John Westcott IV 6ac8668ead Nominal change to the pr body check 2023-01-25 17:12:08 -05:00
thedoubl3j d0516bcdc1 update vars file entry to include over ride examples 2023-01-25 14:41:18 -05:00
Christian Adams ac5a2538bc Fix helm index.yaml generation error (#1199) 2023-01-24 21:40:42 -05:00
Christian Adams 2bdc87d0a8 Add docs for ingress resource apiVersion configuration (#1198) 2023-01-24 22:42:02 +00:00
Joel ab566c2530 backup role use k8s_cp module to write files (#1111) 2023-01-24 17:02:05 -05:00
rakesh561 6a7c3ca2de Add docs for disabling IPv6
* Added procedure to disable ipv6 for AWX deployments when needed.
2023-01-24 04:26:25 +00:00
f6f58d5c6d Setup make index for testing (#1183)
- Reconfigure index file generation
- checkout gh-pages branch in promote.yaml
- fix helm-index make target
- add gh-pages folder in .gitignore

Signed-off-by: Miles Wilson <[email protected]>
Co-authored-by: Hao Liu <[email protected]>
Co-authored-by: Christian Adams <[email protected]>
2023-01-18 17:53:57 -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 43f98eda77 Fix pr_body_check (#1187) 2023-01-11 22:16:58 -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
Dimitri Savineau 1f8414b8cb molecule: set no_log to false (#1185)
In order to get information during CI debugging then turning off the
no_log statement will help with non hidden output.

FAILED! => {"censored": "the output has been hidden due to the fact that
            'no_log: true' was specified for this result"}

Signed-off-by: Dimitri Savineau <[email protected]>
2023-01-11 11:21:53 -05:00
Shane McDonald a199a8c104 Merge pull request #1172 from orcema/orcema-patch-readme-CA
update Trusting a Custom Certificate Authority
2023-01-04 13:18:37 +08:00
Orce MARINKOVSKI fb1639a5d4 update Trusting a Custom Certificate Authority
I had hard times to identify how to declare to include statement for a custom certifcate bundle within the Kustomize file.
The tricky part for me was to spot the option "disableNameSuffixHash: true" in order to avoid renaming the secret name with an has suffix
2022-12-27 10:43:56 +01: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
Dax Kelson 9bf896e37c Update README.md (#1147)
Use awx namespace whent getting AWX instance URL
2022-12-07 14:31:34 -05:00
Christian Adams cb50f4f3ac Add docs for Openshift install configuration (#1140) 2022-12-07 14:18:06 -05:00
Christian Adams 066e55e179 Bump Ansible Operator SDK version to v1.25.3 (#1146) 2022-12-05 16:04:04 -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
Karsten Heymann 95a1fc082b README.md: Add newline after decoded passwords (#1137)
`base64 --decode` prints no new line after its output, resulting in the next shell prompt starting immediately after the password. This makes copying the password difficult. Adding an `echo` at the end of the command fixes this.
2022-11-30 15:59:38 +00:00
dale-mittleman dbd1e59a55 Added flag to disable ipv6 listener (#1135) 2022-11-30 10:38:44 -05:00
Christian Adams 61f45147f6 Set Minimum K8s cluster version we expect to work (#1126) 2022-11-18 10:27:47 -05:00
Michael Cristina c20f9b4128 fix default container name (#1048) 2022-11-16 20:33:50 -05:00
Seth Foster 15568fe564 docs show extra setting double quotes (#1123) 2022-11-16 20:25:28 -05:00
Florian LAUNAY 1baf417504 remove helm chart version from labels (#1114) 2022-11-15 16:32:33 -05:00
janorn 7fbf1c42aa Get tags from remote. Local copy not complete. (#1075) 2022-11-10 00:25:51 -05:00
Christian Adams a5e21b56ae Backup and restore receptor tls secret with expected generated name (#1107) 2022-11-07 11:04:22 -05:00
John Westcott IV 1399504142 Adding community labels on PRs and Issues (#1108) 2022-11-04 11:55:47 -04: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
Christian Adams 1cf466def2 Add expected postgres version and usage docs (#1103) 2022-10-28 15:54:14 -04: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
Shane McDonald e30d26cf7b Merge pull request #1100 from AlanCoding/still_not_fixed
Version 4.0.3 still not fixed, pin to before
2022-10-25 16:50:34 -04:00
Alan Rominger 7c4a731995 Version 4.0.3 still not fixed, pin to before 2022-10-25 16:10:33 -04:00
Dimitri Savineau d2efea08e6 ci: Add check for no_log statement (#1096)
Since e966e92 we're using the `no_log` variable to control the no_log
statement value.
This job will check if the no_log statements are correctly set.

Signed-off-by: Dimitri Savineau <[email protected]>
2022-10-24 14:37:27 -04:00
Julen Landa Alustiza 23e94f82c0 Merge pull request #1091 from Zokormazo/pin-molecule
Avoid molecule 4.0.2
2022-10-18 12:43:40 +02:00
Julen Landa Alustiza de2e58f222 Avoid molecule 4.0.2
Signed-off-by: Julen Landa Alustiza <[email protected]>
2022-10-18 12:29:19 +02:00
Christian Adams 1c7c89efb3 Use Task container resource requirements for init container (#1084) 2022-10-13 12:27:51 -04:00
Ompragash Viswanathan 096fe100f7 Update config/manifests/bases/awx-operator.clusterserviceversion.yaml (#1083) 2022-10-12 14:12:06 -04:00
Christian Adams 58ee2f0c74 Be consistent when naming form entries and with capitalization (#1082) 2022-10-12 11:52:45 -04:00
Shane McDonald 93f7484f38 Merge pull request #1077 from chris93111/patch-1
fix templating config 0.30
2022-10-06 19:37:42 -04:00
chris93111 225c47dbbc fix templating config
indent the comment and remove last -
2022-10-06 13:21:52 +02:00
Christian Adams 2daf8a1320 Add CSV description for OperatorHub (#1072) 2022-10-05 09:17:18 -04:00
Julen Landa Alustiza 5772c706d3 Merge pull request #1073 from Zokormazo/truncate-labels
Fix version label truncating
2022-10-05 11:02:26 +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 Adams 97cd7a9b7a Clarify Restore options in Openshift UI interface (#924) 2022-10-05 00:40:40 -04:00
Dimitri Savineau 0975663a52 csv: Use booleanSwitch for no_log parameter (#1071)
Set the no_log default value in the CRDs and switch from hidden to
boolean in the CSV file so this can be display properly in the UI.

Signed-off-by: Dimitri Savineau <[email protected]>
2022-10-04 23:59:43 -04:00
Dimitri Savineau efdbd61860 csv: Add missing no_log to backup/restore (#1070)
e966e92 adds the configurable no_log parameter to all CRDs (install, backup
and restore) but only once in the CSV file (for installer).

Signed-off-by: Dimitri Savineau <[email protected]>
2022-10-04 14:10:07 -04:00
Dimitri Savineau 13b45cbb12 Merge pull request #1069 from rooftopcellist/no_log_more
More no_log default updates
2022-10-04 11:49:54 -04: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 17eb9cf8e8 Merge pull request #1061 from fosterseth/add_custom_ca_docs
Add docs for adding execution nodes and custom CA
2022-10-03 16:23:42 -04:00
Seth Foster ed7e2b2a28 Add docs for adding execution nodes and custom CA 2022-09-29 15:54:29 -04:00
Hao Liu 5b7589accd Merge pull request #1063 from TheRealHaoLiu/receptor-ca-secret-alternative 2022-09-29 02:04:50 -04:00
janorn a1e289e189 Add workaround to populate index.yaml (#1065)
This will download all releases before cr index is being run.
fixes #1053
2022-09-28 23:51:05 -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
Christian Adams e8096a5f33 Pre-create dummy rh secret to avoid errors (#952) 2022-09-14 19:04:32 -04:00
Israel Blancas 271bce48bd Upgrade operator-sdk version from 1.22.2 to 1.23.0 (#1038)
Signed-off-by: Israel Blancas <[email protected]>
2022-09-12 10:04:07 -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
Christian Adams 1bddb98476 Update requirements.yml and vendor new collections (#1045) 2022-08-31 18:46:33 -04:00
Christian Adams 5f183999d0 Fix restore resource requirements field name for management pod resources (#1044) 2022-08-31 17:06:01 -04:00
Shane McDonald 3769897131 Merge pull request #1041 from shanemcd/ignore-pycache
Add __pycache__ to gitignore
2022-08-30 11:26:02 -04:00
Shane McDonald 7f86231009 Add __pycache__ to gitignore 2022-08-30 11:14:49 -04:00
Shane McDonald f59dac829a Merge pull request #1040 from shanemcd/reusable-labels
Move labels into reusable templates
2022-08-30 11:13:47 -04:00
Shane McDonald edecf4d2fe Move labels into reusable templates 2022-08-30 11:00:43 -04:00
Shane McDonald 4120b5e2b0 Merge pull request #977 from somebadcode/add-ingress-class-name-to-ingress-template
Adding ingress class name to ingress template (#716)
2022-08-29 09:12:52 -04:00
Tobias Dahlberg 8dabca5418 Adding ingress class name to ingress template (#716) 2022-08-29 11:11:19 +02:00
Fedor V 1d341a21d0 feat(readme): remove use of NAMESPACE var (#1028)
- it was used previously, but not anymore
2022-08-25 16:21:58 -04:00
Shane McDonald f8719db954 Merge pull request #1013 from miles-w-3/debug-helm
Streamlined chart build
2022-08-25 11:59:04 -04:00
SweetGeneralandsandesh.gupta 89425826e8 AWX.enable corrected to AWX.enabled (#1035)
Co-authored-by: sandesh.gupta <[email protected]>
2022-08-25 09:26:26 -04: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
Shane McDonald b17cd16fb7 Merge pull request #1008 from rooftopcellist/fix-helm-pkg-build
Fix helm package build redundancy and release automation
2022-08-25 08:38:09 -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 5d0ebd0121 Merge pull request #1029 from shanemcd/delete-logging-code
Delete logging overrides in configmap
2022-08-22 11:48:05 -04:00
Shane McDonald f368a539a9 Delete logging overrides in configmap 2022-08-22 10:56:37 -04:00
Shane McDonald 0aef4cc35f Merge pull request #1026 from shanemcd/respect-LOG_AGGREGATOR_LEVEL
Respect LOG_AGGREGATOR_LEVEL
2022-08-19 13:25:33 -04:00
Shane McDonald e3701dd3db Respect LOG_AGGREGATOR_LEVEL 2022-08-18 19:10:54 -04:00
Elijah DeLee cf98edc282 Merge pull request #976 from jainnikhil30/scale_callback_receiver_workers
configure callback receiver workers based on CPU
2022-08-09 07:23:08 -04:00
Nikhil 58a4778c89 configure callback receiver workers based on CPU 2022-08-09 13:18:41 +05:30
Shane McDonald 8e50bdde9b Merge pull request #1015 from shanemcd/installer-templates-cleanup
Organize installer templates into subdirectories
2022-08-05 12:49:51 -04:00
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
Miles Wilson 8de6179ac7 Streamlined chart build 2022-08-03 22:48:27 -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 c230016819 Fix helm package build redundancy and release automation (#1010) 2022-08-01 21:27:15 +00:00
Christian M. Adams bea05c97ee Fix helm package build redundancy and release automation 2022-08-01 16:00:51 -04:00
John Westcott IV 3a6040e0cd Adding GitHub check to ensure PRs have the proper X/Y/Z flags 2022-08-01 14:09:56 -04:00
John Westcott IV 24f3f440f1 Adding GitHub check to ensure PRs have the proper X/Y/Z flags 2022-08-01 13:04:38 -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
John Westcott IV af2e681f1e Please backup before attempting an upgrade (#1002) 2022-07-28 16:19:57 -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
Ming Quah db6a5b53ed Move custom resource definitions into a CRDs folder (#994)
* Add missing quote for port parameter

* Add step to move CRDs into the correct folder
2022-07-26 18:48:20 -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
Shane McDonald f4a781ccc5 Merge pull request #984 from bewing/makefile-logic
fix helm-chart Makefile issue
2022-07-20 12:40:20 -04:00
John Westcott IV fcd2c4c023 Merge pull request #982 from john-westcott-iv/pr_template
Adding PR template
2022-07-19 04:22:41 -04:00
John Westcott IV 8e30a17a77 Adding PR template 2022-07-19 04:12:38 -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
Brandon Ewing f7ff132a2e fix helm-chart Makefile issue
GNU make resolves the $(wildcard ) macro when starting a block, and
caches it for the duration of the run.  In order to correctly remove
namespace references from the generated helm charts, we have to split
the generation and editing into two makefile targets.
2022-07-14 14:38:09 -05:00
Shane McDonald 5f06e90906 Merge pull request #963 from miles-w-3/helm-values
Added helm values, templates, and readme
2022-07-12 13:50:27 -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
Miles Wilson bc08c4bbbe Added helm values, templates, and readme 2022-07-11 19:59:03 -04:00
Shane McDonald 7697825944 Merge pull request #983 from shanemcd/ingress_path-test
Add tests around ingress_path feature
2022-07-11 19:55:28 -04:00
Shane McDonald 8a325293b1 Add tests around ingress_path feature 2022-07-11 19:45:11 -04:00
Shane McDonald dd53a1d415 Merge pull request #980 from sdktr/958_pgdump_command_customization
Fix 958: allow pg_dump backup command customization
2022-07-11 19:30:30 -04:00
Shane McDonald c5db0e7104 Merge pull request #954 from bewing/helm-namespace
remove namespace from helm chart
2022-07-11 19:18:08 -04:00
Stefan de Kooter 59036fc373 Add free format pg_dump backup parameter 2022-07-10 19:03:32 +00:00
Christian Adams c45a7bd4d7 Add Docs notes for custom secret keys (#969) 2022-06-28 11:05:49 -04: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
Shane McDonald 801f392447 Merge pull request #964 from taishen/devel
Add an example of the nodeport_port in readme
2022-06-27 13:38:24 -04:00
Shane McDonald 779572e8ff Merge pull request #944 from viv-dev/backup-cleanup
Option to delete backup dir on PV when AWXBackup object is deleted
2022-06-27 13:35:57 -04:00
Shane McDonald e7e48f92a0 Merge pull request #962 from rooftopcellist/operator-resource-defaults
Add default resource requests for operator container
2022-06-27 13:33:32 -04:00
Brandon Ewing 3cd9ddd8c6 remove namespace from helm chart
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Update CI process to create namespace during install.

Resolves #907
2022-06-27 12:26:14 -05:00
taishen 4e6be0a82c Add an example of the nodeport_port in readme 2022-06-27 22:02:42 +08: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
Shane McDonald 9676ebc008 Merge pull request #955 from doanminhtu/tudoan/fix-ldap-password-secret-usage
Fix ldap bind password secret usage: ldap_password_secret
2022-06-26 10:45:26 -04:00
Christian M. Adams 8352237260 Add default resource requests for operator container 2022-06-24 16:40:45 -04:00
Alexander Stock 35d4954027 added auto_update flag 2022-06-23 15:05:05 +02:00
Shane McDonald 4d6a491766 Merge pull request #959 from mac-chaffee/no-latest
Use specific version of redis image
2022-06-23 08:16:21 -04:00
Shane McDonald fa9eb53f92 Merge pull request #950 from basecom/feature/nginx-ipv6-support
Enable ipv6 listening in nginx config
2022-06-23 07:51:41 -04:00
Tu Doan 00c9f5fbd1 Fix ldap secret to secret file 2022-06-23 10:49:27 +07:00
Mac Chaffee fe82e9259e Use specific version of redis image
Signed-off-by: Mac Chaffee <[email protected]>
2022-06-22 16:14:39 -04:00
Tu Doan 635d530dc9 Fix ldap bind password secret usage 2022-06-20 17:03:38 +07:00
David Luong e966e9299f Resolves #918 to make no_log configurable (#923) 2022-06-16 01:03:13 -04:00
John Westcott IV 683d23dbea Adding feature requests issue type (#951) 2022-06-15 17:30:00 -04:00
Roger Sikorski 8b3a297086 enable ipv6 on nginx 2022-06-15 17:37:02 +02:00
John Westcott IV 15830e3536 Merge pull request #947 from john-westcott-iv/github_folder_maintainance
.github folder maintainance
2022-06-13 12:20:00 -04:00
John Westcott IV ef46d7f49c Changes from PR review 2022-06-13 11:15:52 -04:00
John Westcott IV a5328b1a09 .github folder maintainance
Changing bug_report from markdown to yaml
Adding config.yml for new issues
Adding Code of Conduct and support to the README (along with tags at the
top of the readme)
Adding SECURITY.md
Adding CODE_OF_CONDUCT.md
2022-06-13 08:22:40 -04:00
Christian Adams 0983220fba Use awx web launch script to pick up the correct supervisor config (#935)
- reduce resource requests so that CI passes in resource constrained
    environments
2022-06-01 19:11:25 -04:00
Dimitri Savineau ba3b6f5436 installer: fix undefined limit key in config
When the task_resource_requirements variable has no "limits" key (which
is the default value) then the config template generation fails

----------------------------------
looking for "config.yaml.j2" at "/opt/ansible/roles/installer/templates/config.yaml.j2"
File lookup using /opt/ansible/roles/installer/templates/config.yaml.j2 as file
fatal: [localhost]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: the inline if-expression on line 36 evaluated to false and no else section was defined.

The error appears to be in /opt/ansible/roles/installer/tasks/resources_configuration.yml: line 30, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Apply Resources
 ^ here
----------------------------------

The current condition doesn't have a else statement so the template fails
when the "limits" key isn't present.
This rewrite the current if/else statement in jinja template.

Signed-off-by: Dimitri Savineau <[email protected]>
2022-05-24 09:29:36 -04:00
Paul Verhoeven 3ac0232e89 Updated the Readme (#906)
* defaults in Deploying a specific version of AWX added

* Update README.md

updated the README clarified the defaults of Deploying a specific version of AWX
2022-05-09 17:24:43 -04:00
Christian Adams 75c7231afd Remove unneeded olm-parameter template file (#901) 2022-05-04 16:45:18 -04:00
Christian AdamsandCedric Morin 363aa3642b added capability to set the redis container resources (#899)
* added capability to set the redis container resources

* Reduce resource requests so that it can be scheduled on GitHub workflows

Co-authored-by: Cedric Morin <[email protected]>
2022-05-03 08:53:45 -04:00
Shane McDonald bf74d5cc34 Merge pull request #799 from mamercad/helm
Add Helm functionality
2022-05-02 14:38:24 -04:00
Shane McDonald 46586bd7b6 Rework helm release process
This was mostly me working around a limitation in chart-releaser where it does not allow for uploading a chart to an existing release.
2022-05-02 14:12:59 -04:00
Shane McDonald 191be7bf3c Run test helm install in CI 2022-05-02 14:12:59 -04:00
Shane McDonald b7e5f235ad Fix yq target
Without this I was seeing:

$ make yq
tar: yq_linux_amd64: Not found in archive
tar: Exiting with failure status due to previous errors
make: *** [Makefile:240: yq] Error 2
2022-05-02 14:12:59 -04:00
Mark Mercado 6cbc6a7234 Set CHART_OWNER as ${{ github.repository_owner }} 2022-05-02 14:12:59 -04:00
Mark Mercado beba6a900d Update kustomize build args for v4+ 2022-05-02 14:12:59 -04:00
Mark Mercado 7f72260445 Adding document-start markers 2022-05-02 14:12:59 -04:00
Mark Mercado 5b7baa106d Adding CI for "make helm-chart" 2022-05-02 14:12:59 -04:00
Mark Mercado 9380686395 Handle amd64 versus x86_64 2022-05-02 14:12:59 -04:00
Mark Mercado 0de966153d Fix kubectl-slice for amd64 2022-05-02 14:12:59 -04:00
Mark Mercado efaa4718ec Adding Helm functionality 2022-05-02 14:12:57 -04:00
Shane McDonald e6a473b765 Merge pull request #887 from ansible/add-content-type-option-header-op
Add the X-Content-Type-Options nosniff header
2022-05-02 08:25:48 -04:00
Christian Adams 859384e9f6 Changed default pull secret to agreed upon name (#896) 2022-04-29 16:21:03 -04:00
Christian Adams b66a16508f Clarify docs on how to configure an External Database (#895) 2022-04-29 15:35:07 -04:00
Christian Adams 3da427f31d Look for a specific pull secret when deployed in certain cloud environments (#894) 2022-04-27 15:44:10 -04:00
Shane McDonald 9f2b51a6a9 Fix mistake in debugging docs 2022-04-25 16:32:50 -04:00
5b73ad172e Load LDAP password from secret and update guideline (#659)
* Load LDAP password from secret and update guideline

* Add pod_labels for custom pod labels

Signed-off-by: Loc Mai <[email protected]>

* Omit tls secret if using wildcard cert

* Resolve conflicts

* Remove the ingress changes

* Remove the config changes

* Load LDAP password from secret and update guideline

* Omit tls secret if using wildcard cert

* Resolve conflicts

* Remove the ingress changes

* Remove the config changes

Co-authored-by: hungts <[email protected]>
Co-authored-by: Loc Mai <[email protected]>
Co-authored-by: Max Bidlingmaier <[email protected]>
Co-authored-by: Max Bidlingmaier <[email protected]>
2022-04-25 16:16:10 -04:00
Shane McDonald 2227301707 Merge pull request #888 from shanemcd/debugging-docs
Add docs/debugging.md
2022-04-25 16:11:21 -04:00
Shane McDonald 9f63fc0da5 Add docs/debugging.md 2022-04-25 16:02:30 -04:00
Seth Foster 322aea970d Merge pull request #886 from fosterseth/make_csrf_settings_boolean
Render cookie settings as a boolean
2022-04-25 15:45:42 -04:00
Seth Foster c4bef95662 Render cookie settings as a boolean 2022-04-25 15:31:09 -04:00
Jeff Bradberry fa705f6466 Add the X-Content-Type-Options nosniff header 2022-04-25 14:00:07 -04:00
290 changed files with 13754 additions and 3318 deletions
+3
View File
@@ -0,0 +1,3 @@
# Community Code of Conduct
Please see the official [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
-39
View File
@@ -1,39 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
##### ISSUE TYPE
- Bug Report
##### SUMMARY
<!-- Briefly describe the problem. -->
##### ENVIRONMENT
* AWX version: X.Y.Z
* Operator version: X.Y.Z
* Kubernetes version:
* AWX install method: openshift, minishift, docker on linux, docker for mac, boot2docker
##### STEPS TO REPRODUCE
<!-- Please describe exactly how to reproduce the problem. -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
##### ACTUAL RESULTS
<!-- What actually happened? -->
##### ADDITIONAL INFORMATION
<!-- Include any links to sosreport, database dumps, screenshots or other
information. -->
##### AWX-OPERATOR LOGS
+125
View File
@@ -0,0 +1,125 @@
---
name: Bug Report
description: "🐞 Create a report to help us improve"
body:
- type: markdown
attributes:
value: |
Bug Report issues are for **concrete, actionable bugs** only.
For debugging help or technical support, please see the [Get Involved section of our README](https://github.com/ansible/awx-operator#get-involved)
- type: checkboxes
id: terms
attributes:
label: Please confirm the following
options:
- label: I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
required: true
- label: I have checked the [current issues](https://github.com/ansible/awx-operator/issues) for duplicates.
required: true
- label: I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.
required: true
- type: textarea
id: summary
attributes:
label: Bug Summary
description: Briefly describe the problem.
validations:
required: false
- type: input
id: awx-operator-version
attributes:
label: AWX Operator version
description: What version of the AWX Operator are you running?
validations:
required: true
- type: input
id: awx-version
attributes:
label: AWX version
description: What version of AWX are you running?
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Kubernetes platform
description: What platform did you install the Operator in?
multiple: false
options:
- kubernetes
- minikube
- openshift
- minishift
- docker development environment
- other (please specify in additional information)
validations:
required: true
- type: input
id: kube-version
attributes:
label: Kubernetes/Platform version
description: What version of your platform/kuberneties are you using?
validations:
required: true
- type: dropdown
id: modified-architecture
attributes:
label: Modifications
description: >-
Have you modified the installation, deployment topology, or container images in any way? If yes, please
explain in the "additional information" field at the bottom of the form.
multiple: false
options:
- "no"
- "yes"
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: >-
Starting from a new installation of the system, describe exactly how a developer or quality engineer can reproduce the bug
on infrastructure that isn't yours. Include any and all resources created, input values, test users, roles assigned, playbooks used, etc.
validations:
required: true
- type: textarea
id: expected-results
attributes:
label: Expected results
description: What did you expect to happpen when running the steps above?
validations:
required: true
- type: textarea
id: actual-results
attributes:
label: Actual results
description: What actually happened?
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: Additional information
description: Include any relevant log output, links to sosreport, database dumps, screenshots, AWX spec yaml, or other information.
validations:
required: false
- type: textarea
id: operator-logs
attributes:
label: Operator Logs
description: Include any relevant logs generated by the operator.
validations:
required: false
+12
View File
@@ -0,0 +1,12 @@
---
blank_issues_enabled: false
contact_links:
- name: For debugging help or technical support
url: https://github.com/ansible/awx-operator#get-involved
about: For general debugging or technical support please see the Get Involved section of our readme.
- name: 📝 Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser
about: AWX uses the Ansible Code of Conduct; ❤ Be nice to other members of the community. ☮ Behave.
- name: 💼 For Enterprise
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser
about: Red Hat offers support for the Ansible Automation Platform
@@ -0,0 +1,29 @@
---
name: ✨ Feature request
description: Suggest an idea for this project
body:
- type: markdown
attributes:
value: |
Feature Request issues are for **feature requests** only.
For debugging help or technical support, please see the [Get Involved section of our README](https://github.com/ansible/awx-operator#get-involved)
- type: checkboxes
id: terms
attributes:
label: Please confirm the following
options:
- label: I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
required: true
- label: I have checked the [current issues](https://github.com/ansible/awx-operator/issues) for duplicates.
required: true
- label: I understand that AWX Operator is open source software provided for free and that I might not receive a timely response.
required: true
- type: textarea
id: summary
attributes:
label: Feature Summary
description: Briefly describe the desired enhancement.
validations:
required: true
+26
View File
@@ -0,0 +1,26 @@
##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
<!---
If you are fixing an existing issue, please include "fixes #nnn" in your
commit message and your description; but you should still explain what
the change does.
-->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
- Breaking Change
- New or Enhanced Feature
- Bug, Docs Fix or other nominal change
##### ADDITIONAL INFORMATION
<!---
Include additional information to help people understand the change here.
For bugs that don't have a linked bug report, a step-by-step reproduction
of the problem is helpful.
-->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```
```
+23
View File
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/docs"
groups:
dependencies:
patterns:
- "*"
schedule:
interval: "weekly"
labels:
- "component:docs"
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
groups:
dependencies:
patterns:
- "*"
schedule:
interval: "weekly"
labels:
- "dependencies"
+38 -10
View File
@@ -4,21 +4,24 @@ name: CI
on:
pull_request:
branches: [devel]
push:
branches: [devel]
jobs:
pull_request:
runs-on: ubuntu-18.04
name: pull_request
molecule:
runs-on: ubuntu-latest
name: molecule
strategy:
matrix:
ansible_args:
- --skip-tags=replicas
- -t replicas
env:
DOCKER_API_VERSION: "1.38"
DOCKER_API_VERSION: "1.41"
DEBUG_OUTPUT_DIR: /tmp/awx_operator_molecule_test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: "3.8"
@@ -35,7 +38,32 @@ jobs:
MOLECULE_VERBOSITY: 3
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
STORE_DEBUG_OUTPUT: true
run: |
sudo rm -f $(which kustomize)
make kustomize
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind -- ${{ matrix.ansible_args }}
- name: Upload artifacts for failed tests if Run Molecule fails
if: failure()
uses: actions/upload-artifact@v4
with:
name: awx_operator_molecule_test
path: ${{ env.DEBUG_OUTPUT_DIR }}
no-log:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check no_log statements
run: |
set +e
no_log=$(grep -nr ' no_log:' roles | grep -v '"{{ no_log }}"')
if [ -n "${no_log}" ]; then
echo 'Please update the following no_log statement(s) with the "{{ no_log }}" value'
echo "${no_log}"
exit 1
fi
nox-sessions:
uses: ./.github/workflows/reusable-nox.yml
+124
View File
@@ -0,0 +1,124 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint scripts & YAML
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install linters
run: |
sudo apt-get update -y
sudo apt-get install -y shellcheck yamllint gettext-base curl ca-certificates
- name: Shellcheck - scan shell scripts
run: |
set -e
files=$(git ls-files 'awx-local-setup/*.sh' || true)
if [ -n "$files" ]; then
echo "Running shellcheck on: $files"
shellcheck -x $files
else
echo "No shell scripts found to lint"
fi
- name: Shell syntax check
run: |
set -e
for f in awx-local-setup/*.sh; do
[ -f "$f" ] || continue
echo "Checking bash syntax: $f"
bash -n "$f"
done
- name: YAML lint
run: |
set -e
files=$(git ls-files '*.yml' '*.yaml' || true)
if [ -n "$files" ]; then
echo "$files" | xargs yamllint -d "extends: default"
else
echo "No YAML files found to lint"
fi
- name: Dry-run setup script
run: |
set -e
chmod +x awx-local-setup/setup_awx_local.sh
./awx-local-setup/setup_awx_local.sh --dry-run --repo-root="$(pwd)"
kustomize-validate:
name: Validate kustomize builds (if any)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install kustomize and kubectl
run: |
set -e
if ! command -v kustomize >/dev/null 2>&1; then
curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s 5.0.0
sudo mv kustomize /usr/local/bin/kustomize || true
fi
if ! command -v kubectl >/dev/null 2>&1; then
curl -sSL -o kubectl https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
fi
- name: Run kustomize build for known directories
run: |
set -e
ok=true
for d in config config/*; do
if [ -d "$d" ] && ( [ -f "$d/kustomization.yaml" ] || [ -f "$d/kustomization.yml" ] ); then
echo "Building kustomize for $d"
kustomize build "$d" >/dev/null || { ok=false; echo "kustomize build failed for $d"; }
fi
done
$ok || (echo "One or more kustomize builds failed" && exit 1)
- name: Kustomize -> kubectl --dry-run=client validation
run: |
set -e
any=false
for d in config config/*; do
if [ -d "$d" ] && ( [ -f "$d/kustomization.yaml" ] || [ -f "$d/kustomization.yml" ] ); then
echo "Validating manifests from $d with kubectl --dry-run=client"
kustomize build "$d" | kubectl apply --dry-run=client -f - || { echo "kubectl --dry-run failed for $d"; exit 1; }
any=true
fi
done
if [ "$any" = false ]; then
echo "No kustomize directories found to validate with kubectl"
fi
release:
name: Create release artifact
runs-on: ubuntu-latest
needs: [lint, kustomize-validate]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create tarball
run: |
tar -czf awx-local-setup.tar.gz awx-local-setup
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: awx-local-setup
path: awx-local-setup.tar.gz
+30 -9
View File
@@ -8,20 +8,41 @@ on:
jobs:
release:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
name: Push devel image
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build Image
- name: Fail if QUAY_REGISTRY not set
run: |
IMG=awx-operator:devel make docker-build
if [[ -z "${{ vars.QUAY_REGISTRY }}" ]]; then
echo "QUAY_REGISTRY not set. Please set QUAY_REGISTRY in variable GitHub Actions variables."
exit 1
fi
- name: Push To Quay
uses: redhat-actions/[email protected]
- name: Log into registry ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
image: awx-operator
tags: devel
registry: quay.io/ansible/
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into registry quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ vars.QUAY_REGISTRY }}
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and Store Image @ghcr
run: |
IMG=ghcr.io/${{ github.repository }}:${{ github.sha }} make docker-buildx
- name: Publish Image to quay.io
run: |
docker buildx imagetools create \
ghcr.io/${{ github.repository }}:${{ github.sha }} \
--tag ${{ vars.QUAY_REGISTRY }}/awx-operator:devel
+56
View File
@@ -0,0 +1,56 @@
---
name: Feature Branch Image Build and Push
on:
push:
branches: [feature_*]
jobs:
release:
runs-on: ubuntu-latest
name: Push devel image
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed so that git describe --tag works
- name: Set VERSION
run: |
echo "VERSION=$(git describe --tags)" >>${GITHUB_ENV}
- name: Set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
- name: Set IMAGE_TAG_BASE
run: |
echo "IMAGE_TAG_BASE=ghcr.io/${OWNER_LC}/awx-operator" >>${GITHUB_ENV}
- name: Log in to registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and Push awx-operator Image
run: |
make docker-build docker-push
docker tag ${IMAGE_TAG_BASE}:${VERSION} ${IMAGE_TAG_BASE}:${GITHUB_REF##*/}
docker push ${IMAGE_TAG_BASE}:${GITHUB_REF##*/}
- name: Build bundle manifests
run: |
make bundle
- name: Build and Push awx-operator Bundle
run: |
make bundle-build bundle-push
docker tag ${IMAGE_TAG_BASE}-bundle:v${VERSION} ${IMAGE_TAG_BASE}-bundle:${GITHUB_REF##*/}
docker push ${IMAGE_TAG_BASE}-bundle:${GITHUB_REF##*/}
- name: Build and Push awx-operator Catalog
run: |
make catalog-build catalog-push
docker tag ${IMAGE_TAG_BASE}-catalog:v${VERSION} ${IMAGE_TAG_BASE}-catalog:${GITHUB_REF##*/}
docker push ${IMAGE_TAG_BASE}-catalog:${GITHUB_REF##*/}
+54
View File
@@ -0,0 +1,54 @@
---
name: Label Issues
on:
issues:
types:
- opened
- reopened
jobs:
triage:
runs-on: ubuntu-latest
name: Label
steps:
- name: Label Issue - Needs Triage
uses: github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
not-before: 2021-12-07T07:00:00Z
configuration-path: .github/issue_labeler.yml
enable-versioned-regex: 0
if: github.event_name == 'issues'
community:
runs-on: ubuntu-latest
name: Label Issue - Community
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install python requests
run: pip install requests
- name: Check if user is a member of Ansible org
uses: jannekem/run-python-script-action@v1
id: check_user
with:
script: |
import requests
headers = {'Accept': 'application/vnd.github+json', 'Authorization': 'token ${{ secrets.GITHUB_TOKEN }}'}
response = requests.get('${{ fromJson(toJson(github.event.issue.user.url)) }}/orgs?per_page=100', headers=headers)
is_member = False
for org in response.json():
if org['login'] == 'ansible':
is_member = True
if is_member:
print("User is member")
else:
print("User is community")
- name: Add community label if not a member
if: contains(steps.check_user.outputs.stdout, 'community')
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "community"
repo-token: ${{ secrets.GITHUB_TOKEN }}
+49
View File
@@ -0,0 +1,49 @@
name: Label PR
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
community:
runs-on: ubuntu-latest
name: Label PR - Community
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Create a virtual environment
run: python3 -m venv venv
- name: Activate virtual environment and install dependencies
run: |
source venv/bin/activate
pip3 install requests
- name: Check if user is a member of Ansible org
uses: jannekem/run-python-script-action@v1
id: check_user
with:
script: |
import requests
headers = {'Accept': 'application/vnd.github+json', 'Authorization': 'token ${{ secrets.GITHUB_TOKEN }}'}
response = requests.get('${{ fromJson(toJson(github.event.pull_request.user.url)) }}/orgs?per_page=100', headers=headers)
is_member = False
for org in response.json():
if org['login'] == 'ansible':
is_member = True
if is_member:
print("User is member")
else:
print("User is community")
- name: Add community label if not a member
if: contains(steps.check_user.outputs.stdout, 'community')
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "community"
repo-token: ${{ secrets.GITHUB_TOKEN }}
+37
View File
@@ -0,0 +1,37 @@
---
name: PR Check
env:
BRANCH: ${{ github.base_ref || 'devel' }}
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
pr-check:
name: Scan PR description for semantic versioning keywords
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check for each of the lines
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
echo "$PR_BODY" | grep "Bug, Docs Fix or other nominal change" > Z
echo "$PR_BODY" | grep "New or Enhanced Feature" > Y
echo "$PR_BODY" | grep "Breaking Change" > X
exit 0
# We exit 0 and set the shell to prevent the returns from the greps from failing this step
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
shell: bash {0}
- name: Check for exactly one item
run: |
if [ $(cat X Y Z | wc -l) != 1 ] ; then
echo "The PR body must contain exactly one of [ 'Bug, Docs Fix or other nominal change', 'New or Enhanced Feature', 'Breaking Change' ]"
echo "We counted $(cat X Y Z | wc -l)"
echo "See the default PR body for examples"
exit 255;
else
exit 0;
fi
+57 -10
View File
@@ -3,23 +3,70 @@ name: Promote AWX Operator image
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Name for the tag of the release.'
required: true
quay_registry:
description: 'Quay registry to push to.'
default: 'quay.io/ansible'
env:
QUAY_REGISTRY: ${{ vars.QUAY_REGISTRY }}
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Log in to GHCR
- name: Set GitHub Env vars for workflow_dispatch event
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
echo "QUAY_REGISTRY=${{ github.event.inputs.quay_registry }}" >> $GITHUB_ENV
- name: Log in to Quay
- name: Set GitHub Env vars if release event
if: ${{ github.event_name == 'release' }}
run: |
echo ${{ secrets.QUAY_TOKEN }} | docker login quay.io -u ${{ secrets.QUAY_USER }} --password-stdin
echo "TAG_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Re-tag and promote awx-operator image
- name: Fail if QUAY_REGISTRY not set
run: |
docker pull ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:latest
docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
docker push quay.io/${{ github.repository }}:latest
if [[ -z "${{ env.QUAY_REGISTRY }}" ]]; then
echo "QUAY_REGISTRY not set. Please set QUAY_REGISTRY in variable GitHub Actions variables."
exit 1
fi
- uses: actions/checkout@v4
with:
depth: 0
- name: Log into registry ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into registry quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.QUAY_REGISTRY }}
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Pull Tagged Staged Image and Publish to quay.io
run: |
docker buildx imagetools create \
ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }} \
--tag ${{ env.QUAY_REGISTRY }}/awx-operator:${{ env.TAG_NAME }}
- name: Pull Staged Image and Publish to quay.io/${{ github.repository }}:latest
run: |
docker buildx imagetools create \
ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }} \
--tag ${{ env.QUAY_REGISTRY }}/awx-operator:latest
@@ -0,0 +1,86 @@
name: Publish AWX Operator on operator-hub
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Name for the tag of the release.'
required: true
operator_hub_fork:
description: 'Fork of operator-hub where the PR will be created from. default: awx-auto'
required: true
default: 'awx-auto'
image_registry:
description: 'Image registry where the image is published to. default: quay.io'
required: true
default: 'quay.io'
image_registry_organization:
description: 'Image registry organization where the image is published to. default: ansible'
required: true
default: 'ansible'
community_operator_github_org:
description: 'Github organization for community-opeartor project. default: k8s-operatorhub'
required: true
default: 'k8s-operatorhub'
community_operator_prod_github_org:
description: 'GitHub organization for community-operator-prod project. default: redhat-openshift-ecosystem'
required: true
default: 'redhat-openshift-ecosystem'
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Set GITHUB_ENV from workflow_dispatch event
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "VERSION=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
echo "IMAGE_REGISTRY=${{ github.event.inputs.image_registry }}" >> $GITHUB_ENV
echo "IMAGE_REGISTRY_ORGANIZATION=${{ github.event.inputs.image_registry_organization }}" >> $GITHUB_ENV
echo "COMMUNITY_OPERATOR_GITHUB_ORG=${{ github.event.inputs.community_operator_github_org }}" >> $GITHUB_ENV
echo "COMMUNITY_OPERATOR_PROD_GITHUB_ORG=${{ github.event.inputs.community_operator_prod_github_org }}" >> $GITHUB_ENV
- name: Set GITHUB_ENV for release event
if: ${{ github.event_name == 'release' }}
run: |
echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
echo "IMAGE_REGISTRY=quay.io" >> $GITHUB_ENV
echo "IMAGE_REGISTRY_ORGANIZATION=ansible" >> $GITHUB_ENV
echo "COMMUNITY_OPERATOR_GITHUB_ORG=k8s-operatorhub" >> $GITHUB_ENV
echo "COMMUNITY_OPERATOR_PROD_GITHUB_ORG=redhat-openshift-ecosystem" >> $GITHUB_ENV
- name: Log in to image registry
run: |
echo ${{ secrets.QUAY_TOKEN }} | docker login ${{ env.IMAGE_REGISTRY }} -u ${{ secrets.QUAY_USER }} --password-stdin
- name: Checkout awx-operator at workflow branch
uses: actions/checkout@v4
with:
path: awx-operator
- name: Checkout awx-opearator at ${{ env.VERSION }}
uses: actions/checkout@v4
with:
fetch-tags: true
ref: ${{ env.VERSION }}
path: awx-operator-${{ env.VERSION }}
fetch-depth: 0 # fetch all history so that git describe works
- name: Copy scripts to awx-operator-${{ env.VERSION }}
run: |
cp -f \
awx-operator/hack/publish-to-operator-hub.sh \
awx-operator-${{ env.VERSION }}/hack/publish-to-operator-hub.sh
cp -f \
awx-operator/Makefile \
awx-operator-${{ env.VERSION }}/Makefile
- name: Build and publish bundle to operator-hub
working-directory: awx-operator-${{ env.VERSION }}
env:
IMG_REPOSITORY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REGISTRY_ORGANIZATION }}
GITHUB_TOKEN: ${{ secrets.AWX_AUTO_GITHUB_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "AWX Automation"
./hack/publish-to-operator-hub.sh
+26
View File
@@ -0,0 +1,26 @@
---
name: nox
"on":
workflow_call:
jobs:
nox:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- session: build
python-versions: "3.11"
name: "Run nox ${{ matrix.session }} session"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup nox
uses: wntrblm/[email protected]
with:
python-versions: "${{ matrix.python-versions }}"
- name: "Run nox -s ${{ matrix.session }}"
run: |
nox -s "${{ matrix.session }}"
+20 -21
View File
@@ -37,14 +37,8 @@ jobs:
exit 0
- name: Checkout awx
uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/awx
path: awx
- name: Checkout awx-operator
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/awx-operator
path: awx-operator
@@ -53,17 +47,20 @@ jobs:
run: |
python3 -m pip install docker
- name: Log in to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Log into registry ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and stage awx-operator
- name: Stage awx-operator
working-directory: awx-operator
run: |
BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=${{ github.event.inputs.default_awx_version }} \
--build-arg OPERATOR_VERSION=${{ github.event.inputs.version }}" \
IMAGE_TAG_BASE=ghcr.io/${{ github.repository_owner }}/awx-operator \
VERSION=${{ github.event.inputs.version }} make docker-build docker-push
--build-arg OPERATOR_VERSION=${{ github.event.inputs.version }}" \
IMG=ghcr.io/${{ github.repository }}:${{ github.event.inputs.version }} \
make docker-buildx
- name: Run test deployment
working-directory: awx-operator
@@ -76,10 +73,12 @@ jobs:
env:
AWX_TEST_VERSION: ${{ github.event.inputs.default_awx_version }}
- name: Create draft release
working-directory: awx
run: |
ansible-playbook tools/ansible/stage.yml \
-e version=${{ github.event.inputs.version }} \
-e repo=${{ github.repository_owner }}/awx-operator \
-e github_token=${{ secrets.GITHUB_TOKEN }}
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: true
-22
View File
@@ -1,22 +0,0 @@
---
name: Triage
on:
issues:
types:
- opened
jobs:
triage:
runs-on: ubuntu-latest
name: Label
steps:
- name: Label issues
uses: github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
not-before: 2021-12-07T07:00:00Z
configuration-path: .github/issue_labeler.yml
enable-versioned-regex: 0
if: github.event_name == 'issues'
+9
View File
@@ -1,6 +1,15 @@
*~
gh-pages/
.cache/
/bin
/bundle
/bundle_tmp*
/bundle.Dockerfile
/charts
/.cr-release-packages
.vscode/
__pycache__
/site
venv/*
hacking/
token
+17
View File
@@ -0,0 +1,17 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# RTD API version
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
mkdocs:
configuration: mkdocs.yml
python:
install:
- requirements: ./docs/requirements.txt
+6
View File
@@ -6,8 +6,14 @@ ignore: |
kustomization.yaml
awx-operator.clusterserviceversion.yaml
bundle
hacking/
rules:
truthy: disable
line-length:
max: 170
document-start: disable
comments-indentation: disable
indentation:
level: warning
indent-sequences: consistent
+24 -17
View File
@@ -6,13 +6,16 @@ Have questions about this document or anything not covered here? Please file a n
## Table of contents
* [Things to know prior to submitting code](#things-to-know-prior-to-submitting-code)
* [Submmiting your Work](#submitting-your-work)
* [Testing](#testing)
* [Testing in Docker](#testing-in-docker)
* [Testing in Minikube](#testing-in-minikube)
* [Generating a bundle](#generating-a-bundle)
* [Reporting Issues](#reporting-issues)
- [AWX-Operator Contributing Guidelines](#awx-operator-contributing-guidelines)
- [Table of contents](#table-of-contents)
- [Things to know prior to submitting code](#things-to-know-prior-to-submitting-code)
- [Submmiting your work](#submmiting-your-work)
- [Development](#development)
- [Testing](#testing)
- [Testing in Kind](#testing-in-kind)
- [Testing in Minikube](#testing-in-minikube)
- [Generating a bundle](#generating-a-bundle)
- [Reporting Issues](#reporting-issues)
## Things to know prior to submitting code
@@ -25,13 +28,13 @@ Have questions about this document or anything not covered here? Please file a n
## Submmiting your work
1. From your fork `devel` branch, create a new brach to stage your changes.
1. From your fork `devel` branch, create a new branch to stage your changes.
```sh
#> git checkout -b <branch-name>
```
2. Make your changes.
3. Test your changes according described on the Testing section.
4. If everylooks looks correct, commit your changes.
4. If everything looks correct, commit your changes.
```sh
#> git add <FILES>
#> git commit -m "My message here"
@@ -40,30 +43,34 @@ Have questions about this document or anything not covered here? Please file a n
**Note**: If you have multiple commits, make sure to `squash` your commits into a single commit which will facilitate our release process.
## Development
The development environment consists of running an [`up.sh`](./up.sh) and a [`down.sh`](./down.sh) script, which applies or deletes yaml on the Openshift or K8s cluster you are connected to. See the [development.md](docs/development.md) for information on how to deploy and test changes from your branch.
## Testing
This Operator includes a [Molecule](https://molecule.readthedocs.io/en/stable/)-based test environment, which can be executed standalone in Docker (e.g. in CI or in a single Docker container anywhere), or inside any kind of Kubernetes cluster (e.g. Minikube).
This Operator includes a [Molecule](https://ansible.readthedocs.io/projects/molecule/)-based test environment, which can be executed standalone in Docker (e.g. in CI or in a single Docker container anywhere), or inside any kind of Kubernetes cluster (e.g. Minikube).
You need to make sure you have Molecule installed before running the following commands. You can install Molecule with:
```sh
#> pip install 'molecule[docker]'
#> python -m pip install molecule-plugins[docker]
```
Running `molecule test` sets up a clean environment, builds the operator, runs all configured tests on an example operator instance, then tears down the environment (at least in the case of Docker).
If you want to actively develop the operator, use `molecule converge`, which does everything but tear down the environment at the end.
#### Testing in Docker
#### Testing in Kind
Testing with a kind cluster is the recommended way to test the awx-operator locally. First, you need to install kind if you haven't already. Please see these docs for setting that up:
* https://kind.sigs.k8s.io/docs/user/quick-start/
To run the tests, from the root of your checkout, run the following command:
```sh
#> molecule test -s test-local
#> molecule test -s kind
```
This environment is meant for headless testing (e.g. in a CI environment, or when making smaller changes which don't need to be verified through a web interface). It is difficult to test things like AWX's web UI or to connect other applications on your local machine to the services running inside the cluster, since it is inside a Docker container with no static IP address.
#### Testing in Minikube
```sh
@@ -137,4 +144,4 @@ Applying this template will do it. Once the CatalogSource is in a READY state, t
## Reporting Issues
We welcome your feedback, and encourage you to file an issue when you run into a problem.
We welcome your feedback, and encourage you to file an issue when you run into a problem.
+12 -1
View File
@@ -1,4 +1,10 @@
FROM quay.io/operator-framework/ansible-operator:v1.12.0
FROM quay.io/operator-framework/ansible-operator:v1.36.1
USER root
RUN dnf update --security --bugfix -y && \
dnf install -y openssl
USER 1001
ARG DEFAULT_AWX_VERSION
ARG OPERATOR_VERSION
@@ -12,3 +18,8 @@ RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \
COPY watches.yaml ${HOME}/watches.yaml
COPY roles/ ${HOME}/roles/
COPY playbooks/ ${HOME}/playbooks/
ENTRYPOINT ["/tini", "--", "/usr/local/bin/ansible-operator", "run", \
"--watches-file=./watches.yaml", \
"--reconcile-period=0s" \
]
+66 -8
View File
@@ -4,6 +4,7 @@
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= $(shell git describe --tags)
PREV_VERSION ?= $(shell git describe --abbrev=0 --tags $(shell git rev-list --tags --skip=1 --max-count=1))
CONTAINER_CMD ?= docker
@@ -37,10 +38,22 @@ IMAGE_TAG_BASE ?= quay.io/ansible/awx-operator
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command
BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests
# You can enable this value if you would like to use SHA Based Digests
# To enable set flag to true
USE_IMAGE_DIGESTS ?= false
ifeq ($(USE_IMAGE_DIGESTS), true)
BUNDLE_GEN_FLAGS += --use-image-digests
endif
# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
NAMESPACE ?= awx
.PHONY: all
all: docker-build
##@ General
@@ -56,44 +69,73 @@ all: docker-build
# More info on the awk command:
# http://linuxcommand.org/lc3_adv_awk.php
.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: print-%
print-%: ## Print any variable from the Makefile. Use as `make print-VARIABLE`
@echo $($*)
##@ Build
.PHONY: run
run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run
.PHONY: docker-build
docker-build: ## Build docker image with the manager.
${CONTAINER_CMD} build $(BUILD_ARGS) -t ${IMG} .
.PHONY: docker-push
docker-push: ## Push docker image with the manager.
${CONTAINER_CMD} push ${IMG}
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail)
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: ## Build and push docker image for the manager for cross-platform support
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push $(BUILD_ARGS) --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile .
- docker buildx rm project-v3-builder
##@ Deployment
.PHONY: install
install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl apply -f -
.PHONY: uninstall
uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl delete -f -
.PHONY: gen-resources
gen-resources: kustomize ## Generate resources for controller and print to stdout
@cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
@$(KUSTOMIZE) build config/default
.PHONY: deploy
deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
@cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
@$(KUSTOMIZE) build config/default | kubectl apply -f -
.PHONY: undeploy
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
$(KUSTOMIZE) build config/default | kubectl delete -f -
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH := $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
ARCHA := $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
ARCHX := $(shell uname -m | sed -e 's/amd64/x86_64/' -e 's/aarch64/arm64/')
.PHONY: kustomize
KUSTOMIZE = $(shell pwd)/bin/kustomize
@@ -103,7 +145,7 @@ ifeq (,$(shell which kustomize 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(KUSTOMIZE)) ;\
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.8.7/kustomize_v3.8.7_$(OS)_$(ARCH).tar.gz | \
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.0.1/kustomize_v5.0.1_$(OS)_$(ARCHA).tar.gz | \
tar xzf - -C bin/ ;\
}
else
@@ -111,6 +153,22 @@ KUSTOMIZE = $(shell which kustomize)
endif
endif
.PHONY: operator-sdk
OPERATOR_SDK = $(shell pwd)/bin/operator-sdk
operator-sdk: ## Download operator-sdk locally if necessary, preferring the $(pwd)/bin path over global if both exist.
ifeq (,$(wildcard $(OPERATOR_SDK)))
ifeq (,$(shell which operator-sdk 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(OPERATOR_SDK)) ;\
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v1.36.1/operator-sdk_$(OS)_$(ARCHA) ;\
chmod +x $(OPERATOR_SDK) ;\
}
else
OPERATOR_SDK = $(shell which operator-sdk)
endif
endif
.PHONY: ansible-operator
ANSIBLE_OPERATOR = $(shell pwd)/bin/ansible-operator
ansible-operator: ## Download ansible-operator locally if necessary, preferring the $(pwd)/bin path over global if both exist.
@@ -119,7 +177,7 @@ ifeq (,$(shell which ansible-operator 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(ANSIBLE_OPERATOR)) ;\
curl -sSLo $(ANSIBLE_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.12.0/ansible-operator_$(OS)_$(ARCH) ;\
curl -sSLo $(ANSIBLE_OPERATOR) https://github.com/operator-framework/ansible-operator-plugins/releases/download/v1.36.1/ansible-operator_$(OS)_$(ARCHA) ;\
chmod +x $(ANSIBLE_OPERATOR) ;\
}
else
@@ -128,11 +186,11 @@ endif
endif
.PHONY: bundle
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
operator-sdk generate kustomize manifests -q
bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
operator-sdk bundle validate ./bundle
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
$(OPERATOR_SDK) bundle validate ./bundle
.PHONY: bundle-build
bundle-build: ## Build the bundle image.
@@ -150,7 +208,7 @@ ifeq (,$(shell which opm 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(OPM)) ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$(OS)-$(ARCH)-opm ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.26.0/$(OS)-$(ARCHA)-opm ;\
chmod +x $(OPM) ;\
}
else
+25
View File
@@ -1,3 +1,7 @@
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: ansible.com
layout:
- ansible.sdk.operatorframework.io/v1
@@ -13,4 +17,25 @@ resources:
group: awx
kind: AWX
version: v1beta1
- api:
crdVersion: v1
namespaced: true
domain: ansible.com
group: awx
kind: AWXBackup
version: v1beta1
- api:
crdVersion: v1
namespaced: true
domain: ansible.com
group: awx
kind: AWXRestore
version: v1beta1
- api:
crdVersion: v1
namespaced: true
domain: ansible.com
group: awx
kind: AWXMeshIngress
version: v1alpha1
version: "3"
+38 -967
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
For all security related bugs, email security@ansible.com instead of using this issue tracker and you will receive a prompt response.
For more information on the Ansible community's practices regarding responsible disclosure, see https://www.ansible.com/security
+1
View File
@@ -26,6 +26,7 @@
image_version: "{{ image_version | default(omit) }}"
development_mode: "{{ development_mode | default(omit) | bool }}"
image_pull_policy: "{{ image_pull_policy | default(omit) }}"
nodeport_port: "{{ nodeport_port | default(omit) }}"
# ee_images:
# - name: test-ee
# image: quay.io/<user>/awx-ee
+1
Submodule awx-local-setup added at 434e91144b
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=AWX Network Bridge - Permanent access to AWX on 192.168.1.144:8082
After=minikube.service
Requires=minikube.service
[Service]
Type=simple
User=alex
ExecStartPre=/bin/bash -c 'until minikube status | grep -q "Running"; do sleep 5; done'
ExecStartPre=/bin/bash -c 'until kubectl get pods -n awx | grep awx-web | grep -q Running; do sleep 5; done'
ExecStart=/usr/bin/socat TCP-LISTEN:8082,bind=192.168.1.144,fork,reuseaddr TCP:192.168.49.2:31080
Restart=always
RestartSec=10
Environment=HOME=/home/alex
[Install]
WantedBy=multi-user.target
View File
View File
+15
View File
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: awx-web-nodeport
namespace: awx
spec:
selector:
app.kubernetes.io/component: awx
app.kubernetes.io/name: awx-web
ports:
- protocol: TCP
port: 8082
targetPort: 8052
type: LoadBalancer
+11
View File
@@ -0,0 +1,11 @@
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
namespace: awx
spec:
service_type: NodePort
ingress_type: none
hostname: awx.local
nodePort: 8081 # Change to an available port, like 8081 or 8082
+7
View File
@@ -0,0 +1,7 @@
---
apiVersion: awx.ansible.com/v1alpha1
kind: AWXMeshIngress
metadata:
name: awx-mesh-ingress-demo
spec:
deployment_name: awx-demo
@@ -0,0 +1,147 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awxbackups.awx.ansible.com
spec:
group: awx.ansible.com
names:
kind: AWXBackup
listKind: AWXBackupList
plural: awxbackups
singular: awxbackup
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
description: Schema validation for the AWXBackup CRD
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- deployment_name
properties:
deployment_name:
description: Name of the deployment to be backed up
type: string
backup_pvc:
description: Name of the backup PVC
type: string
backup_pvc_namespace:
description: (Deprecated) Namespace the PVC is in
type: string
backup_storage_requirements:
description: Storage requirements for backup PVC (may be similar to existing postgres PVC backing up from)
type: string
backup_resource_requirements:
description: Resource requirements for the management pod used to create a backup
properties:
requests:
properties:
cpu:
type: string
memory:
type: string
type: object
limits:
properties:
cpu:
type: string
memory:
type: string
type: object
type: object
backup_storage_class:
description: Storage class to use when creating PVC for backup
type: string
clean_backup_on_delete:
description: Flag to indicate if backup should be deleted on PVC if AWXBackup object is deleted
type: boolean
pg_dump_suffix:
description: Additional parameters for the pg_dump command
type: string
postgres_label_selector:
description: Label selector used to identify postgres pod for backing up data
type: string
postgres_image:
description: Registry path to the PostgreSQL container to use
type: string
postgres_image_version:
description: PostgreSQL container image version to use
type: string
precreate_partition_hours:
description: Number of hours worth of events table partitions to precreate before backup to avoid pg_dump locks.
type: integer
format: int32
image_pull_policy:
description: The image pull policy
type: string
default: IfNotPresent
enum:
- Always
- always
- Never
- never
- IfNotPresent
- ifnotpresent
db_management_pod_node_selector:
description: nodeSelector for the Postgres pods to backup
type: string
no_log:
description: Configure no_log for no_log tasks
type: boolean
default: true
additional_labels:
description: Additional labels defined on the resource, which should be propagated to child resources
type: array
items:
type: string
set_self_labels:
description: Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
type: boolean
default: true
status:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
conditions:
description: The resulting conditions when a Service Telemetry is instantiated
items:
properties:
lastTransitionTime:
type: string
reason:
type: string
status:
type: string
type:
type: string
type: object
type: array
backupDirectory:
description: Backup directory name on the specified pvc
type: string
backupClaim:
description: Backup persistent volume claim
type: string
@@ -0,0 +1,464 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awxmeshingresses.awx.ansible.com
spec:
group: awx.ansible.com
names:
kind: AWXMeshIngress
listKind: AWXMeshIngressList
plural: awxmeshingresses
singular: awxmeshingress
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: AWXMeshIngress is the Schema for the awxmeshingresses API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec defines the desired state of AWXMeshIngress
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- deployment_name
properties:
deployment_name:
description: Name of the AWX deployment to create the Mesh Ingress for.
type: string
image_pull_secrets:
description: Image pull secrets for Mesh Ingress containers.
type: array
items:
type: string
external_hostname:
description: External hostname to use for the Mesh Ingress.
type: string
external_ipaddress:
description: External IP address to use for the Mesh Ingress.
type: string
ingress_type:
description: The ingress type to use to reach the deployed instance
type: string
enum:
- none
- Ingress
- ingress
- IngressRouteTCP
- ingressroutetcp
- Route
- route
ingress_api_version:
description: The Ingress API version to use
type: string
ingress_annotations:
description: Annotations to add to the Ingress Controller
type: string
route_annotations:
description: Annotations to add to the OpenShift Route
type: string
ingress_class_name:
description: The name of ingress class to use instead of the cluster default.
type: string
ingress_controller:
description: Special configuration for specific Ingress Controllers
type: string
node_selector:
description: Assign the Mesh Ingress Pod to the specified node.
type: string
tolerations:
description: Scheduling tolerations for the Mesh Ingress instance.
type: string
topology_spread_constraints:
description: Topology spread constraints for the Mesh Ingress instance.
type: string
affinity:
description: Scheduling constraints to apply to the Pod definition
properties:
nodeAffinity:
properties:
preferredDuringSchedulingIgnoredDuringExecution:
items:
properties:
preference:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchFields:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
x-kubernetes-map-type: atomic
weight:
format: int32
type: integer
required:
- preference
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
properties:
nodeSelectorTerms:
items:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchFields:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
x-kubernetes-map-type: atomic
type: array
required:
- nodeSelectorTerms
type: object
x-kubernetes-map-type: atomic
type: object
podAffinity:
properties:
preferredDuringSchedulingIgnoredDuringExecution:
items:
properties:
podAffinityTerm:
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaces:
items:
type: string
type: array
topologyKey:
type: string
required:
- topologyKey
type: object
weight:
format: int32
type: integer
required:
- podAffinityTerm
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
items:
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaces:
items:
type: string
type: array
topologyKey:
type: string
required:
- topologyKey
type: object
type: array
type: object
podAntiAffinity:
properties:
preferredDuringSchedulingIgnoredDuringExecution:
items:
properties:
podAffinityTerm:
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaces:
items:
type: string
type: array
topologyKey:
type: string
required:
- topologyKey
type: object
weight:
format: int32
type: integer
required:
- podAffinityTerm
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
items:
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaces:
items:
type: string
type: array
topologyKey:
type: string
required:
- topologyKey
type: object
type: array
type: object
type: object
status:
description: Status defines the observed state of AWXMeshIngress
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
subresources:
status: {}
@@ -0,0 +1,153 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awxrestores.awx.ansible.com
spec:
group: awx.ansible.com
names:
kind: AWXRestore
listKind: AWXRestoreList
plural: awxrestores
singular: awxrestore
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
description: Schema validation for the AWXRestore CRD
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- deployment_name
properties:
backup_source:
description: Backup source
type: string
enum:
- Backup CR
- PVC
deployment_name:
description: Name of the restored deployment. This should be different from the original deployment name
if the original deployment still exists.
type: string
cluster_name:
description: Cluster name
type: string
backup_name:
description: AWXBackup object name
type: string
backup_pvc:
description: Name of the PVC to be restored from, set as a status found on the awxbackup object (backupClaim)
type: string
backup_pvc_namespace:
description: (Deprecated) Namespace the PVC is in
type: string
backup_dir:
description: Backup directory name, set as a status found on the awxbackup object (backupDirectory)
type: string
restore_resource_requirements:
description: Resource requirements for the management pod that restores AWX from a backup
properties:
requests:
properties:
cpu:
type: string
memory:
type: string
type: object
limits:
properties:
cpu:
type: string
memory:
type: string
type: object
type: object
postgres_label_selector:
description: Label selector used to identify postgres pod for backing up data
type: string
postgres_image:
description: Registry path to the PostgreSQL container to use
type: string
postgres_image_version:
description: PostgreSQL container image version to use
type: string
spec_overrides:
description: Overrides for the AWX spec
# type: string
type: object
x-kubernetes-preserve-unknown-fields: true
image_pull_policy:
description: The image pull policy
type: string
default: IfNotPresent
enum:
- Always
- always
- Never
- never
- IfNotPresent
- ifnotpresent
db_management_pod_node_selector:
description: nodeSelector for the Postgres pods to backup
type: string
no_log:
description: Configure no_log for no_log tasks
type: boolean
default: true
additional_labels:
description: Additional labels defined on the resource, which should be propagated to child resources
type: array
items:
type: string
set_self_labels:
description: Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
type: boolean
default: true
force_drop_db:
description: Force drop the database before restoring. USE WITH CAUTION!
type: boolean
default: false
status:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
conditions:
description: The resulting conditions when a Service Telemetry is instantiated
items:
properties:
lastTransitionTime:
type: string
reason:
type: string
status:
type: string
type:
type: string
type: object
type: array
restoreComplete:
description: Restore process complete
type: boolean
File diff suppressed because it is too large Load Diff
@@ -1,77 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awxbackups.awx.ansible.com
spec:
group: awx.ansible.com
names:
kind: AWXBackup
listKind: AWXBackupList
plural: awxbackups
singular: awxbackup
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
description: Schema validation for the AWXBackup CRD
properties:
spec:
type: object
required:
- deployment_name
properties:
deployment_name:
description: Name of the deployment to be backed up
type: string
backup_pvc:
description: Name of the PVC to be used for storing the backup
type: string
backup_pvc_namespace:
description: Namespace the PVC is in
type: string
backup_storage_requirements:
description: Storage requirements for the PostgreSQL container
type: string
backup_storage_class:
description: Storage class to use when creating PVC for backup
type: string
postgres_label_selector:
description: Label selector used to identify postgres pod for backing up data
type: string
postgres_image:
description: Registry path to the PostgreSQL container to use
type: string
postgres_image_version:
description: PostgreSQL container image version to use
type: string
status:
type: object
properties:
conditions:
description: The resulting conditions when a Service Telemetry is instantiated
items:
properties:
lastTransitionTime:
type: string
reason:
type: string
status:
type: string
type:
type: string
type: object
type: array
backupDirectory:
description: Backup directory name on the specified pvc
type: string
backupClaim:
description: Backup persistent volume claim
type: string
@@ -1,78 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awxrestores.awx.ansible.com
spec:
group: awx.ansible.com
names:
kind: AWXRestore
listKind: AWXRestoreList
plural: awxrestores
singular: awxrestore
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
description: Schema validation for the AWXRestore CRD
properties:
spec:
type: object
properties:
backup_source:
description: Backup source
type: string
enum:
- CR
- PVC
deployment_name:
description: Name of the deployment to be restored to
type: string
backup_name:
description: AWXBackup object name
type: string
backup_pvc:
description: Name of the PVC to be restored from, set as a status found on the awxbackup object (backupClaim)
type: string
backup_pvc_namespace:
description: Namespace the PVC is in
type: string
backup_dir:
description: Backup directory name, set as a status found on the awxbackup object (backupDirectory)
type: string
postgres_label_selector:
description: Label selector used to identify postgres pod for backing up data
type: string
postgres_image:
description: Registry path to the PostgreSQL container to use
type: string
postgres_image_version:
description: PostgreSQL container image version to use
type: string
status:
type: object
properties:
conditions:
description: The resulting conditions when a Service Telemetry is instantiated
items:
properties:
lastTransitionTime:
type: string
reason:
type: string
status:
type: string
type:
type: string
type: object
type: array
restoreComplete:
description: Restore process complete
type: boolean
+5 -5
View File
@@ -1,9 +1,9 @@
---
# This kustomization.yaml is not intended to be run by itself,
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/awx.ansible.com_awxs.yaml
- bases/awxbackup.ansible.com_awxbackups.yaml
- bases/awxrestore.ansible.com_awxrestores.yaml
# +kubebuilder:scaffold:crdkustomizeresource
- bases/awx.ansible.com_awxs.yaml
- bases/awx.ansible.com_awxbackups.yaml
- bases/awx.ansible.com_awxrestores.yaml
- bases/awx.ansible.com_awxmeshingresses.yaml
#+kubebuilder:scaffold:crdkustomizeresource
+17 -11
View File
@@ -1,24 +1,30 @@
# Adds namespace to all resources.
namespace: awx
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: awx-operator-
# Labels to add to all resources and selectors.
# commonLabels:
# someName: someValue
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
# - ../prometheus
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
patchesStrategicMerge:
- manager_auth_proxy_patch.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
#labels:
#- includeSelectors: true
# pairs:
# someName: someValue
resources:
- ../crd
- ../rbac
- ../manager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patches:
- path: manager_auth_proxy_patch.yaml
+29 -18
View File
@@ -1,4 +1,3 @@
---
# This patch inject a sidecar container which is a HTTP proxy for the
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
apiVersion: apps/v1
@@ -10,20 +9,32 @@ spec:
template:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
protocol: TCP
name: https
- name: awx-manager
args:
- "--health-probe-bind-address=:6789"
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--leader-election-id=awx-operator"
- name: kube-rbac-proxy
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=0"
ports:
- containerPort: 8443
protocol: TCP
name: https
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- name: awx-manager
args:
- "--health-probe-bind-address=:6789"
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--leader-election-id=awx-operator"
+10 -11
View File
@@ -1,4 +1,3 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -8,14 +7,14 @@ spec:
template:
spec:
containers:
- name: awx-manager
args:
- "--config=controller_manager_config.yaml"
volumeMounts:
- name: awx-manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
volumes:
- name: awx-manager
args:
- "--config=controller_manager_config.yaml"
volumeMounts:
- name: awx-manager-config
configMap:
name: awx-manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
volumes:
- name: awx-manager-config
configMap:
name: awx-manager-config
+12 -2
View File
@@ -1,10 +1,20 @@
---
apiVersion: controller-runtime.sigs.k8s.io/v1beta1
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :6789
metrics:
bindAddress: 127.0.0.1:8080
leaderElection:
leaderElect: true
resourceName: 811c9dc5.ansible.com
# leaderElectionReleaseOnCancel defines if the leader should step down volume
# when the Manager ends. This requires the binary to immediately end when the
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
# speeds up voluntary leader transitions as the new leader don't have to wait
# LeaseDuration time first.
# In the default scaffold provided, the program ends immediately after
# the manager stops, so would be fine to enable this option. However,
# if you are doing or is intended to do any operation such as perform cleanups
# after the manager stops then its usage might be unsafe.
# leaderElectionReleaseOnCancel: true
+3
View File
@@ -1,11 +1,14 @@
resources:
- manager.yaml
generatorOptions:
disableNameSuffixHash: true
configMapGenerator:
- files:
- controller_manager_config.yaml
name: awx-manager-config
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
+51 -28
View File
@@ -20,39 +20,62 @@ spec:
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: awx-manager
labels:
control-plane: controller-manager
spec:
securityContext:
runAsNonRoot: true
# For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
# seccompProfile:
# type: RuntimeDefault
containers:
- args:
- --leader-elect
- --leader-election-id=awx-operator
image: controller:latest
name: awx-manager
env:
- name: ANSIBLE_GATHERING
value: explicit
- name: ANSIBLE_DEBUG_LOGS
value: 'false'
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
- args:
- --leader-elect
- --leader-election-id=awx-operator
image: controller:latest
imagePullPolicy: IfNotPresent
name: awx-manager
env:
- name: ANSIBLE_GATHERING
value: explicit
- name: ANSIBLE_DEBUG_LOGS
value: 'false'
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
livenessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "4000Mi"
cpu: "2000m"
serviceAccountName: controller-manager
imagePullSecrets:
- name: redhat-operators-pull-secret
terminationGracePeriodSeconds: 10
File diff suppressed because one or more lines are too long
+4 -5
View File
@@ -1,8 +1,7 @@
---
# These resources constitute the fully configured set of manifests
# used to generate the 'manifests/' directory in a bundle.
resources:
- bases/awx-operator.clusterserviceversion.yaml
- ../default
- ../samples
- ../scorecard
- bases/awx-operator.clusterserviceversion.yaml
- ../default
- ../samples
- ../scorecard
+1 -2
View File
@@ -1,3 +1,2 @@
---
resources:
- monitor.yaml
- monitor.yaml
-1
View File
@@ -1,4 +1,3 @@
---
# Prometheus Monitor Service (Metrics)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
@@ -1,10 +1,9 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: metrics-reader
rules:
- nonResourceURLs:
- "/metrics"
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get
+12 -13
View File
@@ -1,18 +1,17 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: proxy-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
+3 -4
View File
@@ -1,4 +1,3 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
@@ -8,6 +7,6 @@ roleRef:
kind: ClusterRole
name: proxy-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
- kind: ServiceAccount
name: controller-manager
namespace: system
+4 -5
View File
@@ -1,4 +1,3 @@
---
apiVersion: v1
kind: Service
metadata:
@@ -8,9 +7,9 @@ metadata:
namespace: system
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
+18 -19
View File
@@ -1,25 +1,24 @@
---
# permissions for end users to edit awxs.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awx-editor-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxs/status
verbs:
- get
- apiGroups:
- awx.ansible.com
resources:
- awxs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxs/status
verbs:
- get
+14 -15
View File
@@ -1,21 +1,20 @@
---
# permissions for end users to view awxs.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awx-viewer-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxs
verbs:
- get
- list
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxs/status
verbs:
- get
- apiGroups:
- awx.ansible.com
resources:
- awxs
verbs:
- get
- list
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxs/status
verbs:
- get
+24
View File
@@ -0,0 +1,24 @@
# permissions for end users to edit awxbackups.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awxbackup-editor-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxbackups
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxbackups/status
verbs:
- get
+20
View File
@@ -0,0 +1,20 @@
# permissions for end users to view awxbackups.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awxbackup-viewer-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxbackups
verbs:
- get
- list
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxbackups/status
verbs:
- get
@@ -0,0 +1,31 @@
# permissions for end users to edit awxmeshingresses.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: awxmeshingress-editor-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: awx-operator
app.kubernetes.io/part-of: awx-operator
app.kubernetes.io/managed-by: kustomize
name: awxmeshingress-editor-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxmeshingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxmeshingresses/status
verbs:
- get
@@ -0,0 +1,27 @@
# permissions for end users to view awxmeshingresses.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: awxmeshingress-viewer-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: awx-operator
app.kubernetes.io/part-of: awx-operator
app.kubernetes.io/managed-by: kustomize
name: awxmeshingress-viewer-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxmeshingresses
verbs:
- get
- list
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxmeshingresses/status
verbs:
- get
+24
View File
@@ -0,0 +1,24 @@
# permissions for end users to edit awxrestores.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awxrestore-editor-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxrestores
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxrestores/status
verbs:
- get
+20
View File
@@ -0,0 +1,20 @@
# permissions for end users to view awxrestores.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awxrestore-viewer-role
rules:
- apiGroups:
- awx.ansible.com
resources:
- awxrestores
verbs:
- get
- list
- watch
- apiGroups:
- awx.ansible.com
resources:
- awxrestores/status
verbs:
- get
+17 -18
View File
@@ -1,19 +1,18 @@
---
resources:
# All RBAC will be applied under this service account in
# the deployment namespace. You may comment out this resource
# if your manager will use a service account that exists at
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
# subjects if changing service account names.
- service_account.yaml
- role.yaml
- role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
# All RBAC will be applied under this service account in
# the deployment namespace. You may comment out this resource
# if your manager will use a service account that exists at
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
# subjects if changing service account names.
- service_account.yaml
- role.yaml
- role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
+31 -32
View File
@@ -1,38 +1,37 @@
---
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
@@ -1,4 +1,3 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@@ -8,6 +7,6 @@ roleRef:
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
- kind: ServiceAccount
name: controller-manager
namespace: system
+47 -2
View File
@@ -20,7 +20,6 @@ rules:
- watch
- apiGroups:
- ""
- "rbac.authorization.k8s.io"
resources:
- pods
- services
@@ -31,6 +30,17 @@ rules:
- events
- configmaps
- secrets
verbs:
- get
- list
- create
- delete
- patch
- update
- watch
- apiGroups:
- "rbac.authorization.k8s.io"
resources:
- roles
- rolebindings
verbs:
@@ -43,12 +53,22 @@ rules:
- watch
- apiGroups:
- apps
- networking.k8s.io
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- get
- list
- create
- delete
- patch
- update
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- get
@@ -58,6 +78,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- get
- list
- create
- patch
- update
- watch
- apiGroups:
- monitoring.coreos.com
resources:
@@ -104,3 +136,16 @@ rules:
- awxrestores
verbs:
- '*'
- apiGroups:
- traefik.containo.us
- traefik.io
resources:
- ingressroutetcps
verbs:
- get
- list
- create
- delete
- patch
- update
- watch
-1
View File
@@ -1,4 +1,3 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
@@ -0,0 +1,8 @@
# Placeholder to pass CI and allow bundle generation
---
apiVersion: awx.ansible.com/v1alpha1
kind: AWXMeshIngress
metadata:
name: example-awx-mesh-ingress
spec:
deployment_name: example-awx
+3 -3
View File
@@ -6,13 +6,13 @@ metadata:
spec:
web_resource_requirements:
requests:
cpu: 250m
cpu: 50m
memory: 128M
task_resource_requirements:
requests:
cpu: 250m
cpu: 50m
memory: 128M
ee_resource_requirements:
requests:
cpu: 200m
cpu: 50m
memory: 64M
@@ -0,0 +1,48 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-with-limits
spec:
task_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 2000m
memory: 4Gi
web_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
memory: 4Gi
ee_resource_requirements:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 1000m
memory: 4Gi
redis_resource_requirements:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 1000m
memory: 4Gi
rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
memory: 2Gi
init_container_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
memory: 2Gi
+13
View File
@@ -0,0 +1,13 @@
apiVersion: awx.ansible.com/v1beta1
kind: AWXBackup
metadata:
name: example-awx-backup
spec:
deployment_name: example-awx
backup_resource_requirements:
limits:
cpu: "1000m"
memory: "4096Mi"
requests:
cpu: "25m"
memory: "32Mi"
@@ -0,0 +1,14 @@
apiVersion: awx.ansible.com/v1beta1
kind: AWXRestore
metadata:
name: awxrestore-sample
spec:
deployment_name: example-awx-2
backup_name: example-awx-backup
restore_resource_requirements:
limits:
cpu: "1000m"
memory: "4096Mi"
requests:
cpu: "25m"
memory: "32Mi"
+5 -3
View File
@@ -1,5 +1,7 @@
---
## Append samples you want in your CSV to this file as resources ##
resources:
- awx_v1beta1_awx.yaml
# +kubebuilder:scaffold:manifestskustomizesamples
- awx_v1beta1_awx.yaml
- awx_v1beta1_awxbackup.yaml
- awx_v1beta1_awxrestore.yaml
- awx_v1alpha1_awxmeshingress.yaml
#+kubebuilder:scaffold:manifestskustomizesamples
+2 -3
View File
@@ -1,8 +1,7 @@
---
apiVersion: scorecard.operatorframework.io/v1alpha3
kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests: []
- parallel: true
tests: []
+14 -15
View File
@@ -1,17 +1,16 @@
---
resources:
- bases/config.yaml
- bases/config.yaml
patchesJson6902:
- path: patches/basic.config.yaml
target:
group: scorecard.operatorframework.io
version: v1alpha3
kind: Configuration
name: config
- path: patches/olm.config.yaml
target:
group: scorecard.operatorframework.io
version: v1alpha3
kind: Configuration
name: config
# +kubebuilder:scaffold:patchesJson6902
- path: patches/basic.config.yaml
target:
group: scorecard.operatorframework.io
version: v1alpha3
kind: Configuration
name: config
- path: patches/olm.config.yaml
target:
group: scorecard.operatorframework.io
version: v1alpha3
kind: Configuration
name: config
#+kubebuilder:scaffold:patchesJson6902
+3 -4
View File
@@ -1,11 +1,10 @@
---
- op: add
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: basic
test: basic-check-spec-test
+15 -16
View File
@@ -1,11 +1,10 @@
---
- op: add
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: olm
test: olm-bundle-validation-test
@@ -13,9 +12,9 @@
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: olm
test: olm-crds-have-validation-test
@@ -23,9 +22,9 @@
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: olm
test: olm-crds-have-resources-test
@@ -33,9 +32,9 @@
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: olm
test: olm-spec-descriptors-test
@@ -43,9 +42,9 @@
path: /stages/0/tests/-
value:
entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.12.0
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.26.0
labels:
suite: olm
test: olm-status-descriptors-test
+9 -7
View File
@@ -1,13 +1,13 @@
# Adds namespace to all resources.
namespace: osdk-test
namePrefix: osdk-
# Labels to add to all resources and selectors.
# commonLabels:
# someName: someValue
patchesStrategicMerge:
- manager_image.yaml
- debug_logs_patch.yaml
- ../default/manager_auth_proxy_patch.yaml
#commonLabels:
# someName: someValue
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
@@ -18,4 +18,6 @@ images:
- name: testing
newName: testing-operator
patches:
- path: pull_policy/Never.yaml
- path: manager_image.yaml
- path: debug_logs_patch.yaml
- path: ../default/manager_auth_proxy_patch.yaml
+24
View File
@@ -0,0 +1,24 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: clusterip
ingress_type: route
no_log: false
# Secrets
admin_password_secret: custom-admin-password
postgres_configuration_secret: custom-pg-configuration
secret_key_secret: custom-secret-key
# Resource Requirements
postgres_storage_requirements:
requests:
storage: 10Gi
# Extra Settings
extra_settings:
- setting: MAX_PAGE_SIZE
value: "500"
+30
View File
@@ -0,0 +1,30 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: clusterip
ingress_type: Route
postgres_extra_settings:
- setting: max_connections
value: "999"
- setting: ssl_ciphers
value: "HIGH:!aNULL:!MD5"
# requires custom-postgres-configuration secret to be pre-created
# postgres_configuration_secret: custom-postgres-configuration
postgres_resource_requirements:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 800m
memory: 1Gi
postgres_storage_requirements:
requests:
storage: 20Gi
limits:
storage: 100Gi
+13
View File
@@ -0,0 +1,13 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: nodeport
ingress_type: ingress
# Secrets
admin_password_secret: custom-admin-password
postgres_configuration_secret: custom-pg-configuration
secret_key_secret: custom-secret-key
+13
View File
@@ -0,0 +1,13 @@
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: clusterip
ingress_type: Route
# # Secrets
# admin_password_secret: custom-admin-password
# postgres_configuration_secret: custom-pg-configuration
# secret_key_secret: custom-secret-key
+7
View File
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Secret
metadata:
name: custom-admin-password
stringData:
password: 'password'
+7
View File
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Secret
metadata:
name: custom-secret-key
stringData:
secret_key: 'awxsecret'
+12
View File
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Secret
metadata:
name: external-pg-secret
stringData:
database: 'awx'
host: 'awx-postgres'
password: 'test'
port: '5432'
type: 'managed'
username: 'awx'
+16
View File
@@ -0,0 +1,16 @@
# Building the Ansible AWX Operator Docs
To build the AWX Operator docs locally:
1. Clone the AWX operator repository.
1. Preferrably, create a virtual environment for installing the dependencies.
a. `python3 -m venv venv`
b. `source venv/bin/activate`
1. From the root directory:
a. `pip install -r docs/requirements.txt`
b. `mkdocs build`
1. View the docs in your browser:
a. `mkdocs serve`
b. Open your browser and navigate to `http://127.0.0.1:8000/`
This will create a new directory called `site/` in the root of your clone containing the index.html and static files.
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 825 KiB

+3
View File
@@ -0,0 +1,3 @@
# Author
This operator was originally built in 2019 by [Jeff Geerling](https://www.jeffgeerling.com) and is now maintained by the Ansible Team
@@ -0,0 +1,3 @@
# Code of Conduct
We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions or need assistance, please reach out to our community team at [[email protected]](mailto:[email protected])
+5
View File
@@ -0,0 +1,5 @@
# Contributing
Please visit [our contributing guidelines](https://github.com/ansible/awx-operator/blob/devel/CONTRIBUTING.md).
For docs changes, create PRs on the appropriate files in the `/docs` folder.
+24
View File
@@ -0,0 +1,24 @@
# Get Involved
We welcome your feedback, questions and ideas. Here's how to reach the community.
## Forum
Join the [Ansible Forum](https://forum.ansible.com) as a single starting point and our default communication platform for questions and help, development discussions, events, and much more. [Register](https://forum.ansible.com/signup?) to join the community. Search by categories and tags to find interesting topics or start a new one; subscribe only to topics you need!
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. Please add appropriate tags if you start new discussions, for example `awx-operator` and `documentation`.
* [Posts tagged with 'awx-operator'](https://forum.ansible.com/tag/awx-operator): subscribe to participate in project-related conversations.
* [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn) used to announce releases and important changes.
* [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
* [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events.
For more information on the forum navigation, see [Navigating the Ansible forum](https://forum.ansible.com/t/navigating-the-ansible-forum-tags-categories-and-concepts/39) post.
## Matrix
For real-time interactions, conversations in the community happen over the Matrix protocol in the following channels:
* [#awx:ansible.com](https://matrix.to/#/#awx:ansible.com): AWX and AWX-Operator project-related discussions.
* [#docs:ansible.im](https://matrix.to/#/#docs:ansible.im): Ansible, AWX and AWX-Operator documentation-related discussions.
For more information, see the community-hosted [Matrix FAQ](https://hackmd.io/@ansible-community/community-matrix-faq).
@@ -0,0 +1,27 @@
# Release Process
The first step is to create a draft release. Typically this will happen in the [Stage Release](https://github.com/ansible/awx/blob/devel/.github/workflows/stage.yml) workflow for AWX and you don't need to do it as a separate step.
If you need to do an independent release of the operator, you can run the [Stage Release](https://github.com/ansible/awx-operator/blob/devel/.github/workflows/stage.yml) in the awx-operator repo. Both of these workflows will run smoke tests, so there is no need to do this manually.
After the draft release is created, publish it and the [Promote AWX Operator image](https://github.com/ansible/awx-operator/blob/devel/.github/workflows/promote.yaml) will run, which will:
- Publish image to Quay
- Release Helm chart
After the GHA is complete, the final step is to run the [publish-to-operator-hub.sh](https://github.com/ansible/awx-operator/blob/devel/hack/publish-to-operator-hub.sh) script, which will create a PR in the following repos to add the new awx-operator bundle version to OperatorHub:
- <https://github.com/k8s-operatorhub/community-operators> (community operator index)
- <https://github.com/redhat-openshift-ecosystem/community-operators-prod> (operator index shipped with Openshift)
!!! note
The usage is documented in the script itself, but here is an example of how you would use the script to publish the 2.5.3 awx-opeator bundle to OperatorHub.
Note that you need to specify the version being released, as well as the previous version. This is because the bundle has a pointer to the previous version that is it being upgrade from. This is used by OLM to create a dependency graph.
```bash
VERSION=2.5.3 PREV_VERSION=2.5.2 ./hack/publish-to-operator-hub.sh
```
There are some quirks with running this on OS X that still need to be fixed, but the script runs smoothly on linux.
As soon as CI completes successfully, the PR's will be auto-merged. Please remember to monitor those PR's to make sure that CI passes, sometimes it needs a retry.
+104
View File
@@ -0,0 +1,104 @@
# Development Guide
There are development scripts and yaml exaples in the [`dev/`](../dev) directory that, along with the up.sh and down.sh scripts in the root of the repo, can be used to build, deploy and test changes made to the awx-operator.
## Prerequisites
You will need to have the following tools installed:
* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [podman](https://podman.io/docs/installation) or [docker](https://docs.docker.com/get-docker/)
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
* [oc](https://docs.openshift.com/container-platform/4.11/cli_reference/openshift_cli/getting-started-cli.html) (if using Openshift)
You will also need to have a container registry account. This guide uses quay.io, but any container registry will work. You will need to create a robot account and login at the CLI with `podman login` or `docker login`.
## Quay.io Setup for Development
Before using the development scripts, you'll need to set up a Quay.io repository and pull secret:
### 1. Create a Private Quay.io Repository
- Go to [quay.io](https://quay.io) and create a private repository named `awx-operator` under your username
- The repository URL should be `quay.io/username/awx-operator`
### 2. Create a Bot Account
- In your Quay.io repository, go to Settings → Robot Accounts
- Create a new robot account with write permissions to your repository
- Click on the robot account name to view its credentials
### 3. Generate Kubernetes Pull Secret
- In the robot account details, click "Kubernetes Secret"
- Copy the generated YAML content from the pop-up
### 4. Create Local Pull Secret File
- Create a file at `hacking/pull-secret.yml` in your awx-operator checkout
- Paste the Kubernetes secret YAML content into this file
- **Important**: Change the `name` field in the secret from the default to `redhat-operators-pull-secret`
- The `hacking/` directory is in `.gitignore`, so this file won't be committed to git
Example `hacking/pull-secret.yml`:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: redhat-operators-pull-secret # Change this name
namespace: awx
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: <base64-encoded-credentials>
```
## Build and Deploy
If you clone the repo, and make sure you are logged in at the CLI with oc and your cluster, you can run:
```
export QUAY_USER=username
export NAMESPACE=awx
export TAG=test
./up.sh
```
You can add those variables to your .bashrc file so that you can just run `./up.sh` in the future.
> Note: the first time you run this, it will create quay.io repos on your fork. If you followed the Quay.io setup steps above and created the `hacking/pull-secret.yml` file, the script will automatically handle the pull secret. Otherwise, you will need to either make those repos public, or create a global pull secret on your cluster.
To get the URL, if on **Openshift**, run:
```
$ oc get route
```
On **k8s with ingress**, run:
```
$ kubectl get ing
```
On **k8s with nodeport**, run:
```
$ kubectl get svc
```
The URL is then `http://<Node-IP>:<NodePort>`
> Note: NodePort will only work if you expose that port on your underlying k8s node, or are accessing it from localhost.
By default, the usename and password will be admin and password if using the `up.sh` script because it pre-creates a custom admin password k8s secret and specifies it on the AWX custom resource spec. Without that, a password would have been generated and stored in a k8s secret named <deployment-name>-admin-password.
## Clean up
Same thing for cleanup, just run ./down.sh and it will clean up your namespace on that cluster
```
./down.sh
```
## Running CI tests locally
More tests coming soon...
+1
View File
@@ -0,0 +1 @@
../README.md
+177
View File
@@ -0,0 +1,177 @@
# Basic Install
After cloning this repository, you must choose the tag to run:
```sh
git clone git@github.com:ansible/awx-operator.git
cd awx-operator
git tag
git checkout tags/<tag>
# For instance:
git checkout tags/2.7.2
```
If you work from a fork and made modifications since the tag was issued, you must provide the VERSION number to deploy. Otherwise the operator will get stuck in "ImagePullBackOff" state:
```sh
export VERSION=<tag>
# For instance:
export VERSION=2.7.2
```
Once you have a running Kubernetes cluster, you can deploy AWX Operator into your cluster using [Kustomize](https://kubectl.docs.kubernetes.io/guides/introduction/kustomize/). Since kubectl version 1.14 kustomize functionality is built-in (otherwise, follow the instructions here to install the latest version of Kustomize: <https://kubectl.docs.kubernetes.io/installation/kustomize/>)
!!! tip
If you don't have a Kubernetes cluster, you can use [Minikube](https://minikube.sigs.k8s.io/docs/) for testing purposes. See the [Minikube install docs](./creating-a-minikube-cluster-for-testing.md) for more details.
!!! note
Some things may need to be configured slightly differently for different Kubernetes flavors for the networking aspects. When installing on Kind, see the [kind install docs](./kind-install.md) for more details.
There is a make target you can run:
```sh
make deploy
```
If you have a custom operator image you have built, you can specify it with:
```sh
IMG=quay.io/$YOURNAMESPACE/awx-operator:$YOURTAG make deploy
```
Otherwise, you can manually create a file called `kustomization.yaml` with the following content:
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Find the latest tag here: https://github.com/ansible/awx-operator/releases
- github.com/ansible/awx-operator/config/default?ref=<tag>
# Set the image tags to match the git version from above
images:
- name: quay.io/ansible/awx-operator
newTag: <tag>
# Specify a custom namespace in which to install AWX
namespace: awx
```
!!! tip
If you need to change any of the default settings for the operator (such as resources.limits), you can add [patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) at the bottom of your kustomization.yaml file.
Install the manifests by running this:
```sh
$ kubectl apply -k .
namespace/awx created
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com created
serviceaccount/awx-operator-controller-manager created
role.rbac.authorization.k8s.io/awx-operator-awx-manager-role created
role.rbac.authorization.k8s.io/awx-operator-leader-election-role created
clusterrole.rbac.authorization.k8s.io/awx-operator-metrics-reader created
clusterrole.rbac.authorization.k8s.io/awx-operator-proxy-role created
rolebinding.rbac.authorization.k8s.io/awx-operator-awx-manager-rolebinding created
rolebinding.rbac.authorization.k8s.io/awx-operator-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/awx-operator-proxy-rolebinding created
configmap/awx-operator-awx-manager-config created
service/awx-operator-controller-manager-metrics-service created
deployment.apps/awx-operator-controller-manager created
```
Wait a bit and you should have the `awx-operator` running:
```sh
$ kubectl get pods -n awx
NAME READY STATUS RESTARTS AGE
awx-operator-controller-manager-66ccd8f997-rhd4z 2/2 Running 0 11s
```
So we don't have to keep repeating `-n awx`, let's set the current namespace for `kubectl`:
```sh
kubectl config set-context --current --namespace=awx
```
Next, create a file named `awx-demo.yml` in the same folder with the suggested content below. The `metadata.name` you provide will be the name of the resulting AWX deployment.
!!! note
If you deploy more than one AWX instance to the same namespace, be sure to use unique names.
```yaml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-demo
spec:
service_type: nodeport
```
!!! tip
It may make sense to create and specify your own secret key for your deployment so that if the k8s secret gets deleted, it can be re-created if needed. If it is not provided, one will be auto-generated, but cannot be recovered if lost. Read more [here](../user-guide/admin-user-account-configuration.md#secret-key-configuration).
If you are on Openshift, you can take advantage of Routes by specifying the following your spec. This will automatically create a Route for you with a custom hostname. This can be found on the Route section of the Openshift Console.
```yaml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-demo
spec:
service_type: clusterip
ingress_type: Route
```
Make sure to add this new file to the list of `resources` in your `kustomization.yaml` file:
```yaml
...
resources:
- github.com/ansible/awx-operator/config/default?ref=<tag>
# Add this extra line:
- awx-demo.yml
...
```
Finally, apply the changes to create the AWX instance in your cluster:
```sh
kubectl apply -k .
```
After a few seconds, you should see the operator begin to create new resources:
```sh
$ kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
NAME READY STATUS RESTARTS AGE
awx-demo-77d96f88d5-pnhr8 4/4 Running 0 3m24s
awx-demo-postgres-0 1/1 Running 0 3m34s
$ kubectl get svc -l "app.kubernetes.io/managed-by=awx-operator"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
awx-demo-postgres ClusterIP None <none> 5432/TCP 4m4s
awx-demo-service NodePort 10.109.40.38 <none> 80:31006/TCP 3m56s
```
After a few minutes, the new AWX instance will be deployed. You can look at the operator pod logs in order to know where the installation process is at:
```sh
kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager
```
Once deployed, your AWX instance should now be reachable at `http://localhost:<assigned-nodeport>/` (in this case, `http://localhost:31006/`).
By default, the admin user is `admin` and the password is available in the `<resourcename>-admin-password` secret. To retrieve the admin password, run:
```sh
$ kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo
yDL2Cx5Za94g9MvBP6B73nzVLlmfgPjR
```
You just completed the most basic install of an AWX instance via this operator. Congratulations!!!
@@ -0,0 +1,61 @@
# Creating a minikube cluster for testing
If you do not have an existing cluster, the `awx-operator` can be deployed on a [Minikube](https://minikube.sigs.k8s.io/docs/) cluster for testing purposes. Due to different OS and hardware environments, please refer to the official Minikube documentation for further information.
```sh
$ minikube start --cpus=4 --memory=6g --addons=ingress
😄 minikube v1.23.2 on Fedora 34
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🏃 Updating the running docker "minikube" container ...
🐳 Preparing Kubernetes v1.22.2 on Docker 20.10.8 ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
▪ Using image k8s.gcr.io/ingress-nginx/controller:v1.0.0-beta.3
▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
🔎 Verifying ingress addon...
🌟 Enabled addons: storage-provisioner, default-storageclass, ingress
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
```
Once Minikube is deployed, check if the node(s) and `kube-apiserver` communication is working as expected.
```sh
$ minikube kubectl -- get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane,master 113s v1.22.2
$ minikube kubectl -- get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
ingress-nginx ingress-nginx-admission-create--1-kk67h 0/1 Completed 0 2m1s
ingress-nginx ingress-nginx-admission-patch--1-7mp2r 0/1 Completed 1 2m1s
ingress-nginx ingress-nginx-controller-69bdbc4d57-bmwg8 1/1 Running 0 2m
kube-system coredns-78fcd69978-q7nmx 1/1 Running 0 2m
kube-system etcd-minikube 1/1 Running 0 2m12s
kube-system kube-apiserver-minikube 1/1 Running 0 2m16s
kube-system kube-controller-manager-minikube 1/1 Running 0 2m12s
kube-system kube-proxy-5mmnw 1/1 Running 0 2m1s
kube-system kube-scheduler-minikube 1/1 Running 0 2m15s
kube-system storage-provisioner 1/1 Running 0 2m11s
```
It is not required for `kubectl` to be separately installed since it comes already wrapped inside minikube. As demonstrated above, simply prefix `minikube kubectl --` before kubectl command, i.e. `kubectl get nodes` would become `minikube kubectl -- get nodes`
Let's create an alias for easier usage:
```sh
alias kubectl="minikube kubectl --"
```
Now, you can proceed with the installation of the AWX Operator and AWX. Please refer to the [Basic Install](basic-install.md) for further instructions.
!!! tip
Once your AWX has been deployed, the AWX instance will be accessible by running:
```sh
minikube service -n awx awx-demo-service --url
```
For an example using the Nginx Ingress Controller in Minikube, don't miss our [demo video](https://asciinema.org/a/416946).
+119
View File
@@ -0,0 +1,119 @@
# AWX Operator on Kind
## Kind Install
Install Kind by running the following. Refer to the [official Kind documentation](https://kind.sigs.k8s.io/docs/user/quick-start/) for more information.
```sh
# For Intel Macs
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-darwin-amd64
# For M1 / ARM Macs
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-darwin-arm64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
```
### Create the Kind cluster
Create a file called `kind.config`
```yaml
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 32000
hostPort: 32000
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
protocol: tcp # Optional, defaults to tcp
- role: worker
```
Then create a cluster using that config
```sh
kind create cluster --config=kind.config
```
Set cluster context for kubectl
```sh
kubectl cluster-info --context kind-kind
```
Install NGINX Ingress Controller
```sh
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
```
## AWX
Set the namespace context
```sh
kubectl config set-context --current --namespace=awx
```
Checkout the tag you want to install from
```sh
git checkout 2.7.2
```
Create a file named `kustomization.yaml` in the root of your local awx-operator clone. Include the following:
```sh
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Find the latest tag here: https://github.com/ansible/awx-operator/releases
- github.com/ansible/awx-operator/config/default?ref=2.7.2
# Set the image tags to match the git version from above
images:
- name: quay.io/ansible/awx-operator
newTag: 2.7.2
# Specify a custom namespace in which to install AWX
namespace: awx
```
Run the following to apply the yaml
```sh
kubectl apply -k .
```
Create a file called `awx-cr.yaml` with the following contents and any configuration changes you may wish to add.
```yaml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-demo
spec:
service_type: nodeport
nodeport_port: 32000
```
Create your AWX CR
```sh
kubectl create -f awx-cr.yaml
```
Your AWX instance should now be reachable at <http://localhost:32000/>
!!! note
If you configured a custom `nodeport_port`, you can find it by running `kubectl -n awx get svc awx-demo-service`
## Cleanup
When you are done, you can delete all of this by running
```sh
kind delete cluster
```

Some files were not shown because too many files have changed in this diff Show More