fix(t8s-cluster): use plain values for autoScaling#2002
Conversation
Summary of ChangesHello @cwrau, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the autoscaling configuration for node pools within the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded
⌛ 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. 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request restructures the autoscaling configuration format across the t8s-cluster Helm chart. It replaces the nested Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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.
Pull request overview
This PR refactors the autoscaling configuration structure for node pools from a nested object format to flat fields. The change replaces replicas: {min: X, max: Y} with replicas: X and maxReplicas: Y, making these values independently patchable in teuto-portal.
Changes:
- Simplified schema from oneOf union type to flat integer fields for
replicasandmaxReplicas - Updated template logic to use the new flat structure while maintaining validation and autoscaler detection
- Updated CI test values to reflect the new configuration format
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| charts/t8s-cluster/values.schema.json | Refactored schema from oneOf with nested object to flat replicas and maxReplicas properties |
| charts/t8s-cluster/templates/management-cluster/cluster.yaml | Updated template logic to handle new flat structure with proper defaulting and validation |
| charts/t8s-cluster/templates/management-cluster/autoscaler.yaml | Updated autoscaler enablement detection to work with new flat structure |
| charts/t8s-cluster/ci/autoscaling-values.yaml | Updated test values to use new flat structure format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/t8s-cluster/values.schema.json (1)
212-215: Consider adding adescriptiontomaxReplicasto clarify its role.There's no
descriptionon the newmaxReplicasproperty, unlike other properties that document their purpose. A short note (e.g.,"When set and different from replicas, enables autoscaling with replicas as minReplicas") would help consumers understand when to set it.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@charts/t8s-cluster/values.schema.json` around lines 212 - 215, The schema property "maxReplicas" lacks a descriptive "description" field; add a concise description for maxReplicas (e.g., explaining it enables autoscaling when different from replicas and that replicas acts as minReplicas) to the JSON schema so consumers understand its role—update the "maxReplicas" object in values.schema.json to include a "description" string describing when and how to use maxReplicas.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@charts/t8s-cluster/values.schema.json`:
- Around line 212-215: The schema property "maxReplicas" lacks a descriptive
"description" field; add a concise description for maxReplicas (e.g., explaining
it enables autoscaling when different from replicas and that replicas acts as
minReplicas) to the JSON schema so consumers understand its role—update the
"maxReplicas" object in values.schema.json to include a "description" string
describing when and how to use maxReplicas.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
charts/t8s-cluster/ci/autoscaling-values.yamlcharts/t8s-cluster/templates/management-cluster/autoscaler.yamlcharts/t8s-cluster/templates/management-cluster/cluster.yamlcharts/t8s-cluster/values.schema.json
There was a problem hiding this comment.
Code Review
The pull request refactors the autoscaling configuration for node pools in the t8s-cluster Helm chart. It changes the replicas field from a map with min and max to a single replicas integer and introduces a new maxReplicas field. This simplifies the configuration in autoscaling-values.yaml and updates the corresponding Helm templates (autoscaler.yaml and cluster.yaml) and the values.schema.json to reflect these changes. The validation logic for minReplicas and maxReplicas has also been updated to align with the new structure.
That way this is patchable in the teuto-portal until this is completely supported
41e4eca to
9a363a6
Compare
That way this is patchable in the teuto-portal until this is completely
supported
Summary by CodeRabbit
Release Notes