docs(opencut): sync template standards updates#361
Conversation
📝 WalkthroughWalkthroughThis PR adds a new extra egress playground section for the apache chart, documents ChangesNetwork Policy Egress Configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/data/playground-configs.ts (2)
235-262: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMerge the duplicate Apache Network Policy section
Apache now declaresNetwork Policytwice with the samegateField.buildControls()keys section state and DOM lookup bygroup.name, so the two blocks collide and the second one won’t update correctly. Fold the extra egress fields into the existing section, or give the new block a unique name.🤖 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 `@src/data/playground-configs.ts` around lines 235 - 262, The “Network Policy” section is duplicated with the same gateField, which causes buildControls() to collide on group.name and break section state/DOM updates. Update the playground-configs.ts configuration so the existing Network Policy group contains both ingress and egress fields, or rename the extra block to a unique name. Use the Network Policy entries in the configs array and the buildControls() grouping behavior as the guide when fixing this.
1485-1528: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winAdd OpenCut Network Policy controls to the playground.
src/pages/docs/charts/opencut.mdxdocumentsnetworkPolicy.extraEgress, butopencutinsrc/data/playground-configs.tsonly exposes General and Ingress, so the playground hides the documented option.🤖 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 `@src/data/playground-configs.ts` around lines 1485 - 1528, Add the missing OpenCut Network Policy section to the opencut playground config in playground-configs so the documented networkPolicy.extraEgress setting is editable. Update the opencut entry alongside the existing General and Ingress groups, using the same field shape and a clear label/key for networkPolicy.extraEgress, so the playground exposes the option documented in the opencut chart docs.
🤖 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.
Outside diff comments:
In `@src/data/playground-configs.ts`:
- Around line 235-262: The “Network Policy” section is duplicated with the same
gateField, which causes buildControls() to collide on group.name and break
section state/DOM updates. Update the playground-configs.ts configuration so the
existing Network Policy group contains both ingress and egress fields, or rename
the extra block to a unique name. Use the Network Policy entries in the configs
array and the buildControls() grouping behavior as the guide when fixing this.
- Around line 1485-1528: Add the missing OpenCut Network Policy section to the
opencut playground config in playground-configs so the documented
networkPolicy.extraEgress setting is editable. Update the opencut entry
alongside the existing General and Ingress groups, using the same field shape
and a clear label/key for networkPolicy.extraEgress, so the playground exposes
the option documented in the opencut chart docs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7e9ef1d4-29c1-4040-8c25-e53dc74243c2
📒 Files selected for processing (3)
src/data/playground-configs.tssrc/pages/docs/charts/opencut.mdxsrc/pages/playground.astro
2fa2824 to
2e2f26e
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/data/playground-configs.ts (1)
236-262: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMerge "Extra Egress" into the existing "Network Policy" group.
Both groups use the identical
gateField: 'networkPolicy.enabled'. Elsewhere in this file (e.g.memcached,discount-bandit,phpmyadmin) egress-related fields are consolidated into a single "Network Policy" section rather than split across two collapsible groups with the same gate.♻️ Suggested consolidation
{ name: 'Network Policy', collapsible: true, gateField: 'networkPolicy.enabled', fields: [ { label: 'Restrict Ingress', key: 'networkPolicy.ingress.enabled', type: 'toggle', default: 'false', description: 'Restrict inbound traffic only when selectors are configured', }, { label: 'Allow DNS', key: 'networkPolicy.egress.allowDns', type: 'toggle', default: 'true', description: 'Allow DNS egress', }, { label: 'Allow Internet', key: 'networkPolicy.egress.allowInternet', type: 'toggle', default: 'true', description: 'Allow general outbound traffic', }, + { + label: 'Extra Egress CIDR', + key: 'networkPolicy.extraEgress[0].to[0].ipBlock.cidr', + type: 'text', + default: '10.80.0.0/16', + description: 'Additional egress destination', + }, + { + label: 'Extra Egress Port', + key: 'networkPolicy.extraEgress[0].ports[0].port', + type: 'number', + default: '443', + description: 'Additional TCP egress port', + }, ], }, - { - name: 'Extra Egress', - collapsible: true, - gateField: 'networkPolicy.enabled', - fields: [ - { - label: 'Extra Egress CIDR', - key: 'networkPolicy.extraEgress[0].to[0].ipBlock.cidr', - type: 'text', - default: '10.80.0.0/16', - description: 'Additional egress destination', - }, - { - label: 'Extra Egress Port', - key: 'networkPolicy.extraEgress[0].ports[0].port', - type: 'number', - default: '443', - description: 'Additional TCP egress port', - }, - ], - },Also applies to: 285-305
🤖 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 `@src/data/playground-configs.ts` around lines 236 - 262, Merge the separate “Extra Egress” section into the existing “Network Policy” group in playground-configs, since both sections use the same networkPolicy.enabled gate. Update the Network Policy entry in the config array so it includes the egress-related fields currently defined in the Extra Egress group, and remove the duplicate collapsible group. Use the existing Network Policy object and its fields list as the single place for these settings, consistent with the memcached, discount-bandit, and phpmyadmin patterns.
🤖 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 `@src/data/playground-configs.ts`:
- Around line 236-262: Merge the separate “Extra Egress” section into the
existing “Network Policy” group in playground-configs, since both sections use
the same networkPolicy.enabled gate. Update the Network Policy entry in the
config array so it includes the egress-related fields currently defined in the
Extra Egress group, and remove the duplicate collapsible group. Use the existing
Network Policy object and its fields list as the single place for these
settings, consistent with the memcached, discount-bandit, and phpmyadmin
patterns.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f4f71f48-eecd-48dc-bd53-a1f1a0e4dbe1
📒 Files selected for processing (3)
src/data/playground-configs.tssrc/pages/docs/charts/opencut.mdxsrc/pages/playground.astro
✅ Files skipped from review due to trivial changes (1)
- src/pages/docs/charts/opencut.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/pages/playground.astro
Summary
networkPolicy.extraEgressfor OpenCut.Related
Validation
npm run lintnpm run format:checknpm run buildmake site-sync-check CHART=opencutmake release-check REPO=sitemake attribution-check REPO=site