Este conteúdo não está disponível no idioma selecionado.
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 Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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.spec
oc explain ansibleautomationplatform.spec
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To view specific nested sections, query them directly:
oc explain automationcontroller.spec.postgres_configuration_secret oc explain automationcontroller.spec.route_tls_termination_mechanism
oc explain automationcontroller.spec.postgres_configuration_secret oc explain automationcontroller.spec.route_tls_termination_mechanism
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To explore all nested fields at once, use the
--recursive
flag:oc explain automationcontroller.spec --recursive
oc explain automationcontroller.spec --recursive
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Defining a parameter on a nested component Copiar o linkLink copiado para a área de transferência!
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.
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
automationcontroller
parameter with the nestedresource_requirements
parameter and its value:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click to apply the changes. The operator automatically applies this configuration to the automation controller component.
4.4. Customizing your resource requirements Copiar o linkLink copiado para a área de transferência!
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
ResourceQuota
enforced 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.