Chapter 4. Customizing your Red Hat Ansible Automation Platform Operator on OpenShift Container Platform
After installing the Ansible Automation Platform Operator, you can customize your deployment by setting configuration options for its nested components. You must define these parameters on the parent Automation Ansible Platform Custom Resource (CR). The operator automatically disseminates the configuration to each component of the platform.
4.1. Discovering custom resource configuration parameters through the OpenShift Container Platform UI Copy linkLink copied to clipboard!
You can discover the configuration parameters for your Ansible Automation Platform Operator by viewing its Custom Resource (CR). The parameters are listed in the YAML schema.
Procedure
- Log in to Red Hat OpenShift Container Platform.
-
Navigate to
. - Select your Ansible Automation Platform Operator deployment.
- Go to the Ansible Automation Platform tab and click the name of your CR.
Switch to the YAML view tab to view and edit the configuration. The available parameters are listed in the YAML schema.
NoteIf you cannot see the Schema panel, you might have closed or minimized the side bar. Click to reopen it.
4.2. Discovering custom resource definition configuration parameters Copy linkLink copied to clipboard!
The Ansible Automation Platform Operator manages multiple custom resources (CRs), each with its own configuration parameters. Use the oc explain command to discover all available configuration options for the AnsibleAutomationPlatform CR and its nested components.
Procedure
To see all available configuration parameters for a top-level CR, run:
oc explain ansibleautomationplatform.specTo view component-specific configuration options nested under the Ansible Automation Platform CR, query them through the component section:
oc explain ansibleautomationplatform.spec.controller.postgres_configuration_secret oc explain ansibleautomationplatform.spec.controller.route_tls_termination_mechanism oc explain ansibleautomationplatform.spec.hub.storage_type oc explain ansibleautomationplatform.spec.eda.automation_server_urlTo explore all nested fields for a specific component, use the
--recursiveflag:oc explain ansibleautomationplatform.spec.controller --recursive oc explain ansibleautomationplatform.spec.hub --recursive oc explain ansibleautomationplatform.spec.eda --recursiveNoteYou can also query individual component CRs directly if needed:
oc explain automationcontroller.spec oc explain automationhub.spec oc explain eda.specHowever, when configuring components through the Ansible Automation Platform CR (recommended approach), use the nested paths shown above.
4.3. Defining a parameter on a nested component Copy linkLink copied to clipboard!
To define a parameter, such as the resource_requirements for automation controller, you add the configuration to the parent Ansible Automation Platform CR YAML. This ensures that the Ansible Automation Platform CR is the single source of truth for your deployment.
The image and image_version, as well as the {component}_image and {component}_image_version parameters are intended for development or hotfix purposes only.
Do not use these in production environments. These settings bypass standard version management and can lead to configuration drift, inconsistent deployments, and difficulty troubleshooting issues.
Procedure
- Log in to OpenShift Container Platform.
-
Navigate to
. - Select your Ansible Automation Platform Operator deployment.
- Go to the Ansible Automation Platform tab and click the name of your CR.
- In the YAML view tab, locate the spec section.
Add the
automationcontrollerparameter with the nestedresource_requirementsparameter and its value:spec: database: resource_requirements: requests: cpu: 200m memory: 512Mi storage_requirements: requests: storage: 100Gi- Click to apply the changes. The operator automatically applies this configuration to the automation controller component.
4.4. Customizing your resource requirements Copy linkLink copied to clipboard!
Customize resource requirements for your Ansible Automation Platform components to optimize performance and resource allocation in your specific environment.
The following section provides a complete code block with the default resource requirements for each component. The main reasons for customizing your resource requirements include:
- Performance Tuning: Increase resource limits for components that perform heavy workloads.
-
To comply with a
ResourceQuotaenforced by the cluster admin. - Resource Constrained Environments: Decrease resource requests to conserve cluster resources in development or test environments.
- Environment Specifics: Align the resource allocation with the capacity of your OpenShift or Kubernetes cluster nodes.
You can use this reference as a starting point. Copy the full code block for your Ansible Automation Platform instance and modify the values for the components you want to change. This method helps ensure all default settings are applied correctly, reducing the risk of deployment errors.
When adding parameters, you can add it to the Ansible Automation Platform custom resource (CR) only and those parameters will work their way down to the nested CRs.
When removing parameters, you have to remove them both from the Ansible Automation Platform CR and the nested CR, for example, the Automation Controller CR.
# Example of defining custom resource requirements for all components
# This can be useful for clusters with a ResourceQuota in the AAP namespace
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
name: aap
spec:
# Platform
api:
replicas: 1
resource_requirements:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1000Mi
redis:
replicas: 1
resource_requirements:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 500Mi
database:
resource_requirements:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 800Mi
# Components
controller:
disabled: false
uwsgi_processes: 2
task_resource_requirements:
requests:
cpu: 100m
memory: 150Mi
limits:
cpu: 1000m
memory: 1200Mi
web_resource_requirements:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 200m
memory: 1600Mi
ee_resource_requirements:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 1000m
memory: 500Mi
redis_resource_requirements:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 200Mi
rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 250Mi
init_container_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 200Mi
eda:
disabled: false
api:
replicas: 1
resource_requirements:
requests:
cpu: 50m
memory: 350Mi
limits:
cpu: 500m
memory: 400Mi
ui:
replicas: 1
resource_requirements:
requests:
cpu: 25m
memory: 64Mi
limits:
cpu: 500m
memory: 150Mi
scheduler:
replicas: 1
resource_requirements:
requests:
cpu: 50m
memory: 200Mi
limits:
cpu: 500m
memory: 250Mi
worker:
replicas: 2
resource_requirements:
requests:
cpu: 25m
memory: 200Mi
limits:
cpu: 250m
memory: 250Mi
default_worker:
replicas: 1
resource_requirements:
requests:
cpu: 25m
memory: 200Mi
limits:
cpu: 500m
memory: 400Mi
activation_worker:
replicas: 1
resource_requirements:
requests:
cpu: 25m
memory: 150Mi
limits:
cpu: 500m
memory: 400Mi
event_stream:
replicas: 1
resource_requirements:
requests:
cpu: 25m
memory: 150Mi
limits:
cpu: 100m
memory: 300Mi
hub:
disabled: false
## uncomment if using file storage for Content pod
storage_type: file
file_storage_storage_class: nfs-local-rwx # replace with the rwx storage class for your cluster
file_storage_size: 50Gi
## uncomment if using S3 storage for Content pod
# storage_type: S3
# object_storage_s3_secret: example-galaxy-object-storage
## uncomment if using Azure storage for Content pod
# storage_type: azure
# object_storage_azure_secret: azure-secret-name
api:
replicas: 1
resource_requirements:
requests:
cpu: 150m
memory: 256Mi
limits:
cpu: 800m
memory: 500Mi
content:
replicas: 1
resource_requirements:
requests:
cpu: 150m
memory: 256Mi
limits:
cpu: 800m
memory: 1200Mi
worker:
replicas: 1
resource_requirements:
requests:
cpu: 150m
memory: 256Mi
limits:
cpu: 800m
memory: 400Mi
web:
replicas: 1
resource_requirements:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 300Mi
redis:
replicas: 1
resource_requirements:
requests:
cpu: 100m
memory: 250Mi
limits:
cpu: 300m
memory: 400Mi
# lightspeed:
# disabled: true
# End state:
# * Controller deployed and named: myaap-controller
# * EDA deployed and named: myaap-eda
# * Hub deployed and named: myaap-hub