Skip to content

feat(helm): allow custom annotations on the default ModelConfig#2201

Open
marians wants to merge 1 commit into
kagent-dev:mainfrom
giantswarm:feat/modelconfig-annotations
Open

feat(helm): allow custom annotations on the default ModelConfig#2201
marians wants to merge 1 commit into
kagent-dev:mainfrom
giantswarm:feat/modelconfig-annotations

Conversation

@marians

@marians marians commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds an optional per-provider annotations map that is rendered onto the metadata of the Helm-generated default ModelConfig (the one derived from providers.default).

Why

Today helm/kagent/templates/modelconfig.yaml emits only name/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

providers:
  anthropic:
    provider: Anthropic
    model: claude-haiku-4-5
    annotations:
      example.com/display-name: "Claude Haiku 4.5"

The map is generic (no vendor-specific keys) and omitted entirely when unset.

Testing

helm template verified in two cases: with annotations set the block renders under metadata.annotations; without it the output is byte-identical to before (backward-compatible).

Closes #2200

Signed-off-by: Marian Steinbach <marian@giantswarm.io>
@github-actions github-actions Bot added the enhancement New feature or request label Jul 10, 2026
@marians marians marked this pull request as ready for review July 10, 2026 10:37
@marians marians requested a review from a team as a code owner July 10, 2026 10:37
Copilot AI review requested due to automatic review settings July 10, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 annotations map in values.yaml.
  • Render providers.<default>.annotations under metadata.annotations for the generated default ModelConfig, 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.

Comment thread helm/kagent/values.yaml
# caCertSecretRef: ""
# caCertSecretKey: ""
# disableSystemCAs: false
# Optional annotations added to the generated default ModelConfig's metadata.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this key under providers so that we can have a default annotations: {} key to show the API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Allow custom annotations on the Helm-generated default ModelConfig

3 participants