feat(helm/kagent): allow disabling default modelconfig#2142
Open
anthonyhaussman wants to merge 2 commits into
Open
feat(helm/kagent): allow disabling default modelconfig#2142anthonyhaussman wants to merge 2 commits into
anthonyhaussman wants to merge 2 commits into
Conversation
49e6d16 to
9491256
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Helm chart’s default ModelConfig and Secret rendering so users can fully disable default model configuration generation by setting .Values.providers to null, and adds unit tests to validate the “render nothing” behavior.
Changes:
- Wrap
modelconfig.yamlandmodelconfig-secret.yamltemplates inif .Values.providersso they render no documents when providers isnull. - Add helm-unittest coverage ensuring both templates render
0documents whenproviders: null. - Minor whitespace cleanup in an existing test assertion value.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| helm/kagent/templates/modelconfig.yaml | Adds conditional guard around default ModelConfig rendering when providers is nil. |
| helm/kagent/templates/modelconfig-secret.yaml | Adds conditional guard around default Secret rendering when providers is nil. |
| helm/kagent/tests/modelconfig_test.yaml | Adds test asserting no documents rendered when providers: null. |
| helm/kagent/tests/modelconfig-secret_test.yaml | Adds test asserting no documents rendered when providers: null (and fixes trailing whitespace). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Wrap modelconfig and modelconfig-secret templates in a conditional check for .Values.providers. This allows users to completely disable the default modelconfig generation by setting providers to null. Add tests to verify that no documents are rendered when providers is null. Signed-off-by: Anthony Hausman <anthony.hausman@backmarket.com>
Adds fallback validation in modelconfig-secret.yaml to prevent nil pointer errors when providers.default is missing or invalid. Also fixes the config key in modelconfig.yaml to correctly render the defaultProvider string instead of the potentially omitted map key. Signed-off-by: Anthony Hausman <anthony.hausman@backmarket.com>
9491256 to
b006023
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrap
modelconfigandmodelconfig-secrettemplates in a conditional check for.Values.providers.This allows users to completely disable the default modelconfig generation by setting providers to null.
Add tests to verify that no documents are rendered when providers is null.