Skip to content

fix(openreel-video): align template standards#684

Open
mberlofa wants to merge 2 commits into
mainfrom
fix/openreel-video-template-standards
Open

fix(openreel-video): align template standards#684
mberlofa wants to merge 2 commits into
mainfrom
fix/openreel-video-template-standards

Conversation

@mberlofa

@mberlofa mberlofa commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the Helm test hook under templates/tests so helm test remains functional
  • add central validation helper coverage for service.externalName
  • add networkPolicy.extraEgress support with schema and unit coverage
  • fix empty-egress rendering when only extraEgress is configured
  • expand NOTES and README coverage for the operational controls

Validation

  • make validate-chart CHART=openreel-video TIMEOUT=900: FULLY VALIDATED (12 layers), including k3d behavioral scenarios for default, ci/ci-values.yaml, and ci/k3d-values.yaml.
  • make site-sync-check CHART=openreel-video
  • make release-check REPO=charts passed with the expected GR-077 post-merge release confirmation warning.
  • make attribution-check REPO=charts

Site PR: helmforgedev/site#362
Issue: #633

Summary by CodeRabbit

  • New Features
    • Added networkPolicy.extraEgress to append additional egress rules to the chart’s NetworkPolicy.
  • Bug Fixes
    • NetworkPolicy egress now correctly includes both configured egress rules and any appended extraEgress rules.
  • Documentation
    • Updated chart README with networkPolicy.extraEgress guidance and refreshed security scan formatting.
    • Improved Helm NOTES with a numbered, checklist-style verification guide.
  • Validation & Schema
    • Strengthened validation for ExternalName services.
    • Expanded the NetworkPolicy section in the values schema to document enabled, ingress, egress, and extraEgress.
  • Tests
    • Extended NetworkPolicy Helm tests to cover combined egress + extraEgress rendering.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Standards Check (GR-079) — PASS

Every changed chart fully passes standards-check.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ec33cd0d-7b4a-4d9e-9349-8067ffd0a211

📥 Commits

Reviewing files that changed from the base of the PR and between aba58a0 and 7a25550.

📒 Files selected for processing (1)
  • charts/openreel-video/tests/networkpolicy_test.yaml

📝 Walkthrough

Walkthrough

Adds networkPolicy.extraEgress support to the openreel-video Helm chart, updates the NetworkPolicy rendering and schema, centralizes ExternalName validation into a reusable helper, and refreshes the chart tests and documentation.

Changes

NetworkPolicy extraEgress and service validation

Layer / File(s) Summary
NetworkPolicy values and schema for extraEgress
charts/openreel-video/values.yaml, charts/openreel-video/values.schema.json
Adds networkPolicy.extraEgress default (empty list) and expands the JSON schema for networkPolicy to structurally define enabled, ingress, egress, and extraEgress.
NetworkPolicy template egress rendering
charts/openreel-video/templates/networkpolicy.yaml
Renders egress rules from both networkPolicy.egress and networkPolicy.extraEgress, while preserving the empty spec.egress fallback when neither value is set.
Centralized service validation
charts/openreel-video/templates/_helpers.tpl, charts/openreel-video/templates/service.yaml
Adds openreel-video.validate to enforce service.externalName for service.type=ExternalName, and replaces the inline validation in service.yaml with that helper.
Tests and chart documentation
charts/openreel-video/tests/networkpolicy_test.yaml, charts/openreel-video/README.md, charts/openreel-video/templates/NOTES.txt
Adds NetworkPolicy test coverage for default, appended, and combined egress cases, updates the README NetworkPolicy section and security scan formatting, and rewrites NOTES.txt into numbered usage sections.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • helmforgedev/charts#641: Also extends chart NetworkPolicy rendering with an extraEgress option and matching test/doc updates.
  • helmforgedev/charts#642: Also centralizes Helm render-time validation into a named helper that is invoked from a chart template.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the chart/template updates, though it is broader than the specific network policy and validation changes.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/openreel-video-template-standards

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

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🟢 Security Scan: openreel-video

Framework Score
MITRE + NSA + SOC2 92.92929%

✅ Security posture acceptable.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review


P2 Badge Keep Helm test hook under templates

When this pod is moved to the chart-level tests/ directory, Helm no longer renders it into the release manifest as a test hook. I checked helm test --help (tests to be run are defined in the chart that was installed) and helm template review charts/openreel-video, which now emits no helm.sh/hook: test; as a result the documented helm test openreel-video path has no connection checks to run. Keep the hook manifest under templates/tests/ and reserve tests/ for helm-unittest suites.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@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)
charts/openreel-video/tests/networkpolicy_test.yaml (1)

8-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding a combined egress+extraEgress test case.

Current tests cover "only extraEgress" and "neither set" but not both networkPolicy.egress and networkPolicy.extraEgress set together, which exercises the template's concatenation logic more thoroughly.

♻️ Suggested additional test case
  - it: should combine egress and extraEgress rules
    set:
      networkPolicy.enabled: true
      networkPolicy.egress:
        - to:
            - namespaceSelector: {}
          ports:
            - protocol: TCP
              port: 53
      networkPolicy.extraEgress:
        - to:
            - ipBlock:
                cidr: 10.80.0.0/16
          ports:
            - protocol: TCP
              port: 443
    asserts:
      - equal:
          path: spec.egress[0].ports[0].port
          value: 53
      - equal:
          path: spec.egress[1].ports[0].port
          value: 443
🤖 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 `@charts/openreel-video/tests/networkpolicy_test.yaml` around lines 8 - 38, Add
a test in networkpolicy_test.yaml that covers networkPolicy.egress and
networkPolicy.extraEgress being set together, since the current cases only
verify them separately. Update the NetworkPolicy test suite to assert the
combined spec.egress ordering/contents produced by the template logic, using the
existing render assertions around spec.egress and the
networkPolicy.enabled/extraEgress setup as reference.
🤖 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 `@charts/openreel-video/tests/networkpolicy_test.yaml`:
- Around line 8-38: Add a test in networkpolicy_test.yaml that covers
networkPolicy.egress and networkPolicy.extraEgress being set together, since the
current cases only verify them separately. Update the NetworkPolicy test suite
to assert the combined spec.egress ordering/contents produced by the template
logic, using the existing render assertions around spec.egress and the
networkPolicy.enabled/extraEgress setup as reference.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72aa60b8-d23a-4d03-a9d3-e8909afc1857

📥 Commits

Reviewing files that changed from the base of the PR and between 47bc2fc and cece6b0.

📒 Files selected for processing (9)
  • charts/openreel-video/README.md
  • charts/openreel-video/templates/NOTES.txt
  • charts/openreel-video/templates/_helpers.tpl
  • charts/openreel-video/templates/networkpolicy.yaml
  • charts/openreel-video/templates/service.yaml
  • charts/openreel-video/tests/networkpolicy_test.yaml
  • charts/openreel-video/tests/test-connection.yaml
  • charts/openreel-video/values.schema.json
  • charts/openreel-video/values.yaml

@mberlofa mberlofa force-pushed the fix/openreel-video-template-standards branch from cece6b0 to a2f4a45 Compare July 4, 2026 08:46
@mberlofa mberlofa force-pushed the fix/openreel-video-template-standards branch from a2f4a45 to aba58a0 Compare July 4, 2026 20:11
@mberlofa

mberlofa commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the still-valid CodeRabbit review-body nitpick:

  • Added a networkPolicy unit test covering networkPolicy.egress and networkPolicy.extraEgress set together.
  • The test asserts the rendered spec.egress ordering: base egress first, appended extraEgress second.

Validation completed after the fix:

  • make validate-chart CHART=openreel-video TIMEOUT=1200 passed: openreel-video: FULLY VALIDATED (12 layers) including all GR-027 k3d scenarios.
  • make release-check REPO=charts passed with only the expected GR-077 release warning.
  • make attribution-check REPO=charts passed.

This CodeRabbit note was in the review summary body, not as a separate resolvable review thread, so there was no thread ID to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant