fix(cozystack-basics): gate the hostname VAP policies on the VAP API - #3409
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughHostname policy Helm templates now check for the Kubernetes ValidatingAdmissionPolicy API before rendering. Existing tests declare the capability, and new coverage verifies that route, gateway, and ingress policies produce no documents when it is unavailable. ChangesHostname policy capability gating
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)packages/system/cozystack-basics/templates/gateway-hostname-policy.yamlTraceback (most recent call last): packages/system/cozystack-basics/templates/ingress-hostname-policy.yamlTraceback (most recent call last): packages/system/cozystack-basics/templates/route-hostname-policy.yamlTraceback (most recent call last):
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 |
Render the route, gateway and ingress hostname ValidatingAdmissionPolicies only where the admissionregistration.k8s.io/v1/ValidatingAdmissionPolicy API is served, matching the deletion-protection guard, so a cluster without that API does not receive an unrenderable resource. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
41fdd91 to
267ea51
Compare
|
Successfully created backport PR for |
What this PR does
Wraps the route, gateway, and ingress hostname
ValidatingAdmissionPolicytemplates in a.Capabilities.APIVersions.Hasgate so they render only where the VAP API is available. Without it, an operator-generated HelmRelease with drift detection off renders the policies out at first install on a cluster missing the API and never adds them back. Each template gains a sibling test asserting it renders zero documents when the API is absent. Install-robustness fix, split out from #3299.Summary by CodeRabbit