Add AAP plugin for Ansible Automation Platform deployment#387
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR adds complete Ansible Automation Platform (AAP) plugin support to the enclave framework. It introduces a schema property for the license file path, a plugin manifest defining the AAP operator and feature configuration, pre-validation for the license file, and a comprehensive Kubernetes deployment workflow that manages operator availability, license secrets, custom resource creation, and component readiness polling. ChangesAAP Plugin Support
Sequence DiagramsequenceDiagram
participant PreValidator as Pre-validator
participant Operator as AAP Operator
participant Secret as License Secret
participant AAPV1 as AAPv1 CR
participant Controller as AutomationController
participant EDA as EDA
participant Hub as AutomationHub
PreValidator->>PreValidator: Validate aap_license_file exists
Operator->>Operator: Wait for Available=True
PreValidator->>Secret: Load license file & create Secret
Secret-->>AAPV1: License reference
Operator->>AAPV1: Deploy AnsibleAutomationPlatform CR
AAPV1->>AAPV1: Poll for Successful=True
AAPV1->>Controller: Conditionally wait for Successful=True
AAPV1->>EDA: Conditionally wait for Successful=True
AAPV1->>Hub: Conditionally wait for Successful=True
Controller-->>Operator: Component status (Successful/Unknown/disabled)
EDA-->>Operator: Component status (Successful/Unknown/disabled)
Hub-->>Operator: Component status (Successful/Unknown/disabled)
Operator->>Operator: Emit readiness summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The PR introduces a complete new plugin with schema, manifest, validation, and orchestration logic. While each file is straightforward, the deployment workflow requires careful review of the Kubernetes polling logic, retry mechanics, conditional status checking, and component readiness orchestration. The changes are focused and localized to the AAP plugin directory with no existing code modifications. Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/aap/tasks/deploy.yaml`:
- Around line 18-35: The tasks "Read AAP license file" and "Create AAP license
Secret" currently register sensitive data (__r_aap_license_content and
__r_aap_license) but don't prevent it from appearing in logs; add task-level
no_log: true to both tasks so Ansible redacts the slurped license content and
the created secret on success/failure, keeping the existing registers and
variable names intact.
In `@plugins/aap/tasks/pre-validate.yaml`:
- Around line 2-14: The stat task currently references {{ aap_license_file }}
before the conditional fail runs, causing an undefined-variable error; update
the "Check AAP license file exists" task to (1) use a safe default for the path
argument (e.g. path: "{{ aap_license_file | default('') }}") so templating never
errors and (2) add a when guard to only run the stat when aap_license_file is
defined and non-empty (e.g. when: aap_license_file is defined and
aap_license_file | length > 0), leaving the Fail task (which checks
aap_license_file is not defined or the registered
__r_aap_license_stat.stat.exists is false) unchanged.
In `@schemas/variables.yaml`:
- Around line 241-243: The schema entry for aap_license_file currently allows
empty strings; update the variable schema for aap_license_file to enforce
non-empty values by adding a JSON Schema constraint (e.g., minLength: 1) to the
aap_license_file definition so validation fails fast if the value is empty;
locate the aap_license_file entry and add the minLength (or equivalent
non-empty) constraint to its definition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d8b9fe16-5775-472b-bfee-88d1c9ba7b82
📒 Files selected for processing (5)
config/global.example.yamlplugins/aap/plugin.yamlplugins/aap/tasks/deploy.yamlplugins/aap/tasks/pre-validate.yamlschemas/variables.yaml
Deploys the AAP operator and AnsibleAutomationPlatform CR with configurable components (controller, EDA, hub, lightspeed). Requires aap_license_file pointing to a valid manifest.zip on the Landing Zone. The plugin validates the file exists before deployment and waits for full reconciliation. OSAC-931
| # Path to the AAP license manifest.zip file on the Landing Zone. | ||
| # See https://github.com/osac-project/osac-installer#obtaining-an-aap-license-subscription-manifest | ||
| # | ||
| # aap_license_file: "/path/to/aap-license.zip" |
There was a problem hiding this comment.
nit: in general I think we tend to name configuration properties and defaults using camel case... not enforced in any way, unfortunately
| path: "{{ aap_license_file | default('') }}" | ||
| register: __r_aap_license_stat | ||
| when: aap_license_file is defined and aap_license_file | length > 0 | ||
|
|
There was a problem hiding this comment.
should we check that the license file has the expected shape/format/whatever?
Deploys the AAP operator and AnsibleAutomationPlatform CR with configurable components (controller, EDA, hub, lightspeed).
Requires
aap_license_filepointing to a valid manifest.zip on the Landing Zone. The plugin validates the file exists before deployment and waits for full reconciliation.OSAC-931
Summary by CodeRabbit
New Features
Chores