Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for spec overrides when restoring AWX #1862

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/crd/bases/awx.ansible.com_awxrestores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ spec:
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ spec:
path: postgres_image_version
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: AWX Spec Overrides
path: spec_overrides
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- displayName: Image Pull Policy
path: image_pull_policy
x-descriptors:
Expand Down
2 changes: 2 additions & 0 deletions roles/restore/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ additional_labels: []

# Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
set_self_labels: true

spec_overrides: {}
...
5 changes: 5 additions & 0 deletions roles/restore/tasks/deploy_awx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---

- name: Combine spec_overrides with spec
set_fact:
spec: "{{ spec | default({}) | combine(spec_overrides) }}"
no_log: "{{ no_log }}"

- name: Deploy AWX
k8s:
state: "{{ state | default('present') }}"
Expand Down
Loading