fix: use unused values from the helm values section#2376
Conversation
✅ Deploy Preview for ocm-website canceled.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 42 minutes and 9 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis pull request adds conditional Helm annotations to four CRD templates to control resource lifecycle management, makes the controller-manager deployment configurable with replicas and environment variables, and removes unused top-level metrics configuration from the chart values schema. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@kubernetes/controller/chart/templates/manager/manager.yaml`:
- Line 13: The template currently allows manager.replicas to be set >1 while
manager.leaderElection.enabled is false; add a Helm render-time guard in the
manager.yaml template that checks .Values.manager.replicas and
.Values.manager.leaderElection.enabled and fails rendering if replicas > 1 and
leaderElection.enabled is false (use Helm's conditional and fail function) so
the chart render aborts with a clear message referencing manager.replicas and
manager.leaderElection.enabled; alternatively enforce replicas=1 when leader
election is disabled by overriding the replicas value in the same template.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fa548c98-d10b-49b0-a51e-049b99a9ca35
📒 Files selected for processing (7)
kubernetes/controller/chart/templates/crd/components.delivery.ocm.software.yamlkubernetes/controller/chart/templates/crd/deployers.delivery.ocm.software.yamlkubernetes/controller/chart/templates/crd/repositories.delivery.ocm.software.yamlkubernetes/controller/chart/templates/crd/resources.delivery.ocm.software.yamlkubernetes/controller/chart/templates/manager/manager.yamlkubernetes/controller/chart/values.schema.jsonkubernetes/controller/chart/values.yaml
💤 Files with no reviewable changes (2)
- kubernetes/controller/chart/values.yaml
- kubernetes/controller/chart/values.schema.json
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
e21802d to
ae2f04a
Compare
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
What this PR does / why we need it
Notices during an investigation on the attached issue that we have a couple of values in values.yaml that aren't using in the deployment template.
Which issue(s) this PR fixes
Part of open-component-model/service-provider-ocm#95.
Testing
How to test the changes
Verification
task testandtask test/integrationif applicable)go workis enabled (seego.work)ocm