Generate aapctl manifests for GitOps

You can use aapctl to generate Kubernetes manifests without applying them to the cluster. Save the output for review, version control, or GitOps integration.

About this task

Important:

aapctl is a Technology Preview feature. Technology Preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process. Technology Preview features are not fully supported under Red Hat production SLA and may not be functionally complete. Red Hat does not recommend using Technology Preview features in production. For more information on the support scope for Technology Preview features, see Technology Preview Features Support Scope.

Procedure

  1. Generate the installation manifests without applying them to the cluster.
    $ aapctl install ao --dry-run -o yaml > manifests.yaml

    Progress messages go to standard error. Manifest YAML goes to standard output. You can redirect the output to a file without capturing progress noise.

    Apply configuration overrides the same way as a live install:

    $ aapctl install ao --dry-run -o yaml \
        --set automation-orchestrator-cr.postgres.host=my-pg.example.com \
        --set automation-orchestrator-cr.postgres.sslMode=require \
        > manifests.yaml

    The output is a multi-document YAML stream. Each resource is separated by ---.

  2. If you enabled CloudNativePG, remove the Secret resources from the generated YAML file.

    Each --dry-run invocation produces different random passwords for database Secrets. Committing generated Secrets to version control causes unnecessary drift on every regeneration.

  3. Create Secrets through your secrets management tool (for example, HashiCorp Vault, Bitnami SealedSecrets, or External Secrets Operator).

    If you provide your own PostgreSQL instance (the default), aapctl does not generate database Secrets. You must create database connection Secrets separately regardless of which PostgreSQL option you use.

  4. Commit the non-Secret manifests to your Git repository.

Results

Note:

This procedure has the following limitations:

  • YAML only: The --dry-run flag supports only YAML output (-o yaml).
  • Non-deterministic Secrets: Database Secrets contain random passwords that change on each invocation. Do not commit generated Secrets to version control.
  • No InstallPlan resources: The output includes Operator Lifecycle Manager (OLM) Subscriptions but not InstallPlans. OLM creates and manages InstallPlans at apply time.