Skip to content

Rewrite PG templates to match upstream; add 4.19-4.22 support; default to PolicyGenerator#191

Merged
akrzos merged 1 commit into
redhat-performance:mainfrom
akrzos:acm-policygenerator-update
Jul 2, 2026
Merged

Rewrite PG templates to match upstream; add 4.19-4.22 support; default to PolicyGenerator#191
akrzos merged 1 commit into
redhat-performance:mainfrom
akrzos:acm-policygenerator-update

Conversation

@akrzos

@akrzos akrzos commented Jul 1, 2026

Copy link
Copy Markdown
Member
  • Rewrite pg-du-4.18/ to match upstream cnf-features-deploy format with acm- prefix filenames, removing the old common/ and group-du/ subdirectory include pattern. Consolidates 4.18 and 4.19 with an ICSP/IDMS Jinja2 conditional.
  • Add pg-du-4.20/ for OCP 4.20+ using telco-reference subdirectory source-crs paths. Consolidates 4.20, 4.21, and 4.22 since upstream PG files are identical.
  • Default acm_policygenerator to true (PG is now primary, PGT deprecated).
  • Add derived variables (_pg_du_profile_version, _policy_dir_prefix, _policy_file_prefix, _policy_template_version) to centralize PG/PGT switching for clean future PGT removal.
  • Drop manyPolicies from PG templates to reduce complexity.
  • Update tasks/main.yml to use derived variables instead of inline ternary.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 29cebd86-8732-42e1-9f7e-c6dea7b04d94

📥 Commits

Reviewing files that changed from the base of the PR and between 1de8e7b and 997a3fd.

📒 Files selected for processing (45)
  • ansible/roles/telco-ran-du-ztp/defaults/main.yml
  • ansible/roles/telco-ran-du-ztp/tasks/main.yml
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-12.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml
💤 Files with no reviewable changes (21)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
✅ Files skipped from review due to trivial changes (2)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-validator-ranGen.yaml
🚧 Files skipped from review as they are similar to previous changes (13)
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/tasks/main.yml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-12.j2
  • ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml
  • ansible/roles/telco-ran-du-ztp/defaults/main.yml

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added/updated common and DU group policy generators for standard, 3-node, and SNO profiles (including operator/config policies).
    • Added/extended disconnected-registry behavior and hub-derived annotation support for generated policies.
  • Changes

    • Enabled the newer DU policy generation mode by default.
    • Standardized generated policy/manifest naming with a version-based file prefix.
    • Updated DU validator placement selection to no longer strictly require the du-profile=latest label.
  • Bug Fixes

    • Improved consistency of generated PTP, SR-IOV, performance, storage, and subscription handling across DU profiles.

Walkthrough

This PR switches the telco-ran-du-ztp role to PolicyGenerator defaults, adds derived naming variables, rewires manifest and generator filenames, introduces new 4.18 and 4.20 PolicyGenerator templates, and updates shared hub-annotation Jinja snippets.

Changes

PG default switch and consolidated PolicyGenerator templates

Layer / File(s) Summary
Default variables and derived PG naming
ansible/roles/telco-ran-du-ztp/defaults/main.yml, ansible/roles/telco-ran-du-ztp/tasks/main.yml, ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml
Switches acm_policygenerator to true, adds derived naming variables, and updates DU manifest templating plus generator filenames to use the new policy prefix values.
Hub annotation Jinja snippets
ansible/roles/telco-ran-du-ztp/templates/pg-common/*.j2
Adds and reworks conditional Jinja snippets that emit common and group/site hub-derived annotations.
pg-du-4.18 common PolicyGenerator templates
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml, acm-common-ranGen.yaml
Adds new common/common-mno PolicyGenerator templates with disconnected-registry and subscription policy content.
pg-du-4.18 group-du PolicyGenerator templates
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml, acm-group-du-3node-validator-ranGen.yaml, acm-group-du-sno-ranGen.yaml, acm-group-du-standard-ranGen.yaml, acm-group-du-standard-validator-ranGen.yaml
Adds and updates 4.18 group-du PolicyGenerator templates for 3node, sno, and standard profiles, including PTP, SR-IOV, storage, performance-profile, crun, and validator policy generation.
pg-du-4.20 common PolicyGenerator templates
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml, acm-common-ranGen.yaml
Adds equivalent 4.20 common/common-mno PolicyGenerator templates.
pg-du-4.20 group-du and validator PolicyGenerator templates
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-ranGen.yaml, acm-group-du-3node-validator-ranGen.yaml, acm-group-du-sno-ranGen.yaml, acm-group-du-sno-validator-ranGen.yaml, acm-group-du-standard-ranGen.yaml, acm-group-du-standard-validator-ranGen.yaml
Adds 4.20 group-du and validator PolicyGenerator templates for 3node, sno, and standard profiles.
Estimated code review effort: 4 (Complex) ~75 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title summarizes the upstream PG template rewrite and the switch to PolicyGenerator, and broadly matches the changeset.
Description check ✅ Passed The description clearly describes the template rewrite, version consolidation, and default PolicyGenerator switch in the diff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@akrzos akrzos force-pushed the acm-policygenerator-update branch 3 times, most recently from 438759c to 86e25c9 Compare July 2, 2026 13:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml (1)

60-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Repeated hub-template annotation block — consider extracting to a shared include.

The extraHubGroupTemplates/extraHubSiteTemplates annotation Jinja block is duplicated 7 times in this consolidated file (and similarly in sibling group-du templates). Extracting it into a small partial template ({% include %}) would reduce maintenance risk when this pattern changes.

As per path instructions, "**" should focus on major issues impacting readability and maintainability.

Also applies to: 79-94, 128-142, 158-173, 179-194, 216-232, 252-267

🤖 Prompt for 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.

In
`@ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml`
around lines 60 - 76, The repeated hub-template annotation block in this
template is duplicated across multiple conditional sections, so refactor it into
a shared partial/include to improve maintainability. Extract the common
`extraHubGroupTemplates`/`extraHubSiteTemplates` annotation markup from the
current `acm-group-du-sno-ranGen.yaml` template into a reusable snippet, then
reference that snippet wherever the same `patches`/`metadata.annotations`
pattern appears in this file and the sibling group-du templates. Use the
existing conditional blocks and the hub-specific symbols such as
`extraHubGroupTemplates`, `extraHubSiteTemplates`, and `ManagedClusterName` to
keep the behavior unchanged while removing duplication.

Source: Path instructions

🤖 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.

Nitpick comments:
In
`@ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml`:
- Around line 60-76: The repeated hub-template annotation block in this template
is duplicated across multiple conditional sections, so refactor it into a shared
partial/include to improve maintainability. Extract the common
`extraHubGroupTemplates`/`extraHubSiteTemplates` annotation markup from the
current `acm-group-du-sno-ranGen.yaml` template into a reusable snippet, then
reference that snippet wherever the same `patches`/`metadata.annotations`
pattern appears in this file and the sibling group-du templates. Use the
existing conditional blocks and the hub-specific symbols such as
`extraHubGroupTemplates`, `extraHubSiteTemplates`, and `ManagedClusterName` to
keep the behavior unchanged while removing duplication.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 95803316-b539-472b-ba6e-e69d8fbfed96

📥 Commits

Reviewing files that changed from the base of the PR and between ccbfed6 and efa2043.

📒 Files selected for processing (42)
  • ansible/roles/telco-ran-du-ztp/defaults/main.yml
  • ansible/roles/telco-ran-du-ztp/tasks/main.yml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/disable-sno-network-diag.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/olm-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml
💤 Files with no reviewable changes (23)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/olm-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/disable-sno-network-diag.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml

@akrzos akrzos force-pushed the acm-policygenerator-update branch 6 times, most recently from 95aa99a to ccfd7a0 Compare July 2, 2026 17:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml (1)

57-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Parameterize the 3-node PerformanceProfile values too The 3-node template still hardcodes CPU and hugepage values while the SNO template uses setup_ztp_perfprofile_*. If these values are meant to vary by platform, add matching variables/defaults here so both paths stay aligned.

🤖 Prompt for 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.

In
`@ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml`
around lines 57 - 73, The 3-node PerformanceProfile block still hardcodes
platform-specific CPU and hugepage settings. Update the PerformanceProfile patch
in the 3-node template to use the same setup_ztp_perfprofile_*
variables/defaults pattern as the SNO path, and reference the
PerformanceProfile-SetSelector section so both templates stay aligned and
configurable.
🤖 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.

Nitpick comments:
In
`@ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml`:
- Around line 57-73: The 3-node PerformanceProfile block still hardcodes
platform-specific CPU and hugepage settings. Update the PerformanceProfile patch
in the 3-node template to use the same setup_ztp_perfprofile_*
variables/defaults pattern as the SNO path, and reference the
PerformanceProfile-SetSelector section so both templates stay aligned and
configurable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: f0e79538-8476-4cdb-be36-15b71058bb54

📥 Commits

Reviewing files that changed from the base of the PR and between 5447981 and ccfd7a0.

📒 Files selected for processing (45)
  • ansible/roles/telco-ran-du-ztp/defaults/main.yml
  • ansible/roles/telco-ran-du-ztp/tasks/main.yml
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/common-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-10.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations-12.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-common/group-hub-annotations.j2
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml
💤 Files with no reviewable changes (21)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/lca-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/oadp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-standard-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-standard.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/lca-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/storage-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-3node.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/performance-profile-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/ptp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-sno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/clo-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/sriov-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common/oadp-sub.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/ptp-config.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/common-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du/sriov-operator-config-sno.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/group-du-3node-ranGen.yaml
✅ Files skipped from review due to trivial changes (1)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-standard-validator-ranGen.yaml
🚧 Files skipped from review as they are similar to previous changes (7)
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.18/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-common-mno-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-sno-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/templates/pg-du-4.20/acm-group-du-3node-validator-ranGen.yaml
  • ansible/roles/telco-ran-du-ztp/tasks/main.yml
  • ansible/roles/telco-ran-du-ztp/defaults/main.yml
  • ansible/roles/telco-ran-du-ztp/templates/policy-kustomization.yaml

@akrzos akrzos force-pushed the acm-policygenerator-update branch from ccfd7a0 to 1de8e7b Compare July 2, 2026 19:16
…t to PolicyGenerator

- Rewrite pg-du-4.18/ to match upstream cnf-features-deploy format with acm-
  prefix filenames, removing the old common/ and group-du/ subdirectory include
  pattern. Consolidates 4.18 and 4.19 with an ICSP/IDMS Jinja2 conditional.
- Add pg-du-4.20/ for OCP 4.20+ using telco-reference subdirectory source-crs
  paths. Consolidates 4.20, 4.21, and 4.22 since upstream PG files are identical.
- Extract repeated hub annotation Jinja2 blocks into pg-common/ shared includes
  to reduce duplication across group-du and common templates.
- Fix imageDigestMirrors to include all 5 mirror entries matching
  repositoryDigestMirrors; simplify 4.18 ICSP/IDMS conditional to share the
  common mirror list.
- Default acm_policygenerator to true (PG is now primary, PGT deprecated).
- Add derived variables (_pg_du_profile_version, _policy_dir_prefix,
  _policy_file_prefix, _policy_template_version) to centralize PG/PGT switching
  for clean future PGT removal.
- Drop manyPolicies from PG templates to reduce complexity.
- Update tasks/main.yml to use derived variables instead of inline ternary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@akrzos akrzos force-pushed the acm-policygenerator-update branch from 1de8e7b to 997a3fd Compare July 2, 2026 20:34
@akrzos akrzos merged commit b6771e3 into redhat-performance:main Jul 2, 2026
1 check was pending
@akrzos akrzos deleted the acm-policygenerator-update branch July 2, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant