redhat-cop / aap_utilities

Ansible Collection for automated deployment of AAP and other objects for general use
https://galaxy.ansible.com/infra/aap_utilities
GNU General Public License v3.0
81 stars 50 forks source link

Enable the ability to override OpenShift manifests #256

Closed sabre1041 closed 1 month ago

sabre1041 commented 1 month ago

What does this PR do?

The aap_ocp_install role enables the creation of OpenShift manifests to deploy AAP. However, the manifests that are generated only cover a fraction of the available parameters for each of the resources that it manages.

This PR introduces the concept of manifest_overrides which enables the ability to specify values for each of the OpenShift items managed by this role.

For example to be able to specify the number of Automation Controller task replicas, the following can be set.

aap_ocp_install_controller:
  controller_manifest_overrides:
    spec:
      task_replicas: 2

How should this be tested?

Utilize the example shown above in a playbook similar to the following

- name: Testing
  hosts: localhost
  vars:
    aap_ocp_install_controller:
      instance_name: "aap1"
      controller_manifest_overrides:
        spec:
          task_replicas: 2
    aap_ocp_install_operator:
      channel: 'stable-2.4'

  tasks:
    - name: Import aap_ocp_install Role
      ansible.builtin.include_role:
        name: aap_ocp_install

Confirm that task_replicas: 2 is present on the AutomationController resource.

Is there a relevant Issue open for this?

No

Other Relevant info, PRs, etc

None