feat(helm): allow custom annotations on the default ModelConfig#2201
feat(helm): allow custom annotations on the default ModelConfig#2201marians wants to merge 3 commits into
Conversation
Signed-off-by: Marian Steinbach <marian@giantswarm.io>
There was a problem hiding this comment.
Pull request overview
Adds support for specifying arbitrary Kubernetes annotations on the Helm-generated default ModelConfig (the one derived from providers[.Values.providers.default]), enabling downstream tooling/distributions to attach metadata without post-rendering or managing a separate ModelConfig.
Changes:
- Document a new optional per-provider
annotationsmap invalues.yaml. - Render
providers.<default>.annotationsundermetadata.annotationsfor the generated defaultModelConfig, omitting the block when unset.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| helm/kagent/values.yaml | Documents the new optional per-provider annotations values knob for the default ModelConfig. |
| helm/kagent/templates/modelconfig.yaml | Conditionally renders $model.annotations into metadata.annotations on the generated default ModelConfig. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # caCertSecretRef: "" | ||
| # caCertSecretKey: "" | ||
| # disableSystemCAs: false | ||
| # Optional annotations added to the generated default ModelConfig's metadata. |
There was a problem hiding this comment.
Can we add this key under providers so that we can have a default annotations: {} key to show the API?
There was a problem hiding this comment.
Sure. Done in 3479892. Thanks for the review!
There was a problem hiding this comment.
You did not do what i asked, i asked to move the key up a level
Signed-off-by: Marian Steinbach <marian@giantswarm.io>
Signed-off-by: Marian Steinbach <marian@giantswarm.io>
What
Adds an optional per-provider
annotationsmap that is rendered onto the metadata of the Helm-generated default ModelConfig (the one derived fromproviders.default).Why
Today
helm/kagent/templates/modelconfig.yamlemits onlyname/namespace/labels— there is no supported way to attach annotations to the default ModelConfig via values. Downstream distributions and tooling that key off resource annotations (e.g. a UI reading a display-name annotation) currently have to either post-render the chart-owned object or define a separate, self-managed ModelConfig (leaving the chart's unconditional default ModelConfig created but unused). See #2200.How
The map is generic (no vendor-specific keys) and omitted entirely when unset.
Testing
helm templateverified in two cases: withannotationsset the block renders undermetadata.annotations; without it the output is byte-identical to before (backward-compatible).Closes #2200