Skip to content

feat(helm): add extraObjects for arbitrary manifests#2174

Open
younsl wants to merge 3 commits into
kagent-dev:mainfrom
younsl:feat/helm-extra-objects
Open

feat(helm): add extraObjects for arbitrary manifests#2174
younsl wants to merge 3 commits into
kagent-dev:mainfrom
younsl:feat/helm-extra-objects

Conversation

@younsl

@younsl younsl commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Adds an optional top-level extraObjects value that renders arbitrary Kubernetes manifests within the kagent chart. It is empty by default so existing installs stay unaffected. Each entry is rendered through tpl so values can reference the release context such as {{ include "kagent.fullname" . }} or {{ .Release.Namespace }}. Both map and multi-line string entries are supported.

This lets users manage companion resources like ExternalSecret or HTTPRoute in the same chart lifecycle. It follows a common pattern used by community charts such as:

  • grafana
  • kube-prometheus-stack
  • external-secrets

Changes

  • New template templates/extra-objects.yaml ranging over .Values.extraObjects (default []).
  • Documented extraObjects in values.yaml with an ExternalSecret example.
  • Added helm-unittest suite tests/extra-objects_test.yaml.

Testing

helm unittest helm/kagent passes. The new suite covers the empty default map entries multiple documents tpl evaluation against the release context and multi-line string entries.

Notes

This change was originally intended for #2165 but was split into its own PR at a maintainer request so each concern can be reviewed on its own.

Add a top-level `extraObjects` value that renders arbitrary
user-supplied Kubernetes manifests within the kagent chart. Each entry
is processed through `tpl`, so values may reference the release context
(e.g. release name, namespace, chart helpers).

Both map and multi-line string entries are supported. This lets users
manage companion resources such as ExternalSecret, HTTPRoute, or
NetworkPolicy in the same chart lifecycle without maintaining a
separate chart. When `extraObjects` is empty (the default), no
additional documents are rendered, so existing installs are unaffected.

Covered by a helm-unittest suite.

Signed-off-by: younsl <cysl@kakao.com>
Copilot AI review requested due to automatic review settings July 7, 2026 15:31
@younsl younsl requested a review from a team as a code owner July 7, 2026 15:31
@github-actions github-actions Bot added the enhancement New feature or request label Jul 7, 2026

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 a new Helm chart capability to render user-supplied, arbitrary Kubernetes manifests alongside the kagent chart via a top-level extraObjects value, enabling companion resources (e.g., ExternalSecret, HTTPRoute) to be managed in the same release lifecycle.

Changes:

  • Introduces extraObjects (default []) in values.yaml, with documentation and an example.
  • Adds a new Helm template to render each extraObjects entry via tpl (supporting both map and multi-line string entries).
  • Adds a helm-unittest suite covering empty/default behavior, multiple docs, tpl evaluation, and string entries.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
helm/kagent/values.yaml Documents and introduces the extraObjects top-level value with an example manifest.
helm/kagent/templates/extra-objects.yaml Implements rendering of arbitrary user manifests through tpl for both map and string entries.
helm/kagent/tests/extra-objects_test.yaml Adds unit tests validating rendering behavior and templating against release context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread helm/kagent/templates/extra-objects.yaml Outdated
Comment thread helm/kagent/values.yaml Outdated
younsl and others added 2 commits July 8, 2026 00:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Younsung Lee <cysl@kakao.com>
Signed-off-by: younsl <cysl@kakao.com>
@younsl

younsl commented Jul 8, 2026

Copy link
Copy Markdown
Author

@EItanya PTAL

Comment thread helm/kagent/values.yaml
# resources such as ExternalSecret, HTTPRoute, or NetworkPolicy within the same
# chart lifecycle without maintaining a separate chart.
# @default -- []
extraObjects: []

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.

uncommenting the example lines without also changing extraObjects: [] to extraObjects: produces a yaml parse error. two edits are required, but only one is obvious.

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.

3 participants