feat(helm): add extraObjects for arbitrary manifests#2174
Open
younsl wants to merge 3 commits into
Open
Conversation
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>
Contributor
There was a problem hiding this comment.
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[]) invalues.yaml, with documentation and an example. - Adds a new Helm template to render each
extraObjectsentry viatpl(supporting both map and multi-line string entries). - Adds a helm-unittest suite covering empty/default behavior, multiple docs,
tplevaluation, 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.
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>
Author
|
@EItanya PTAL |
mesutoezdil
reviewed
Jul 8, 2026
| # resources such as ExternalSecret, HTTPRoute, or NetworkPolicy within the same | ||
| # chart lifecycle without maintaining a separate chart. | ||
| # @default -- [] | ||
| extraObjects: [] |
Contributor
There was a problem hiding this comment.
uncommenting the example lines without also changing extraObjects: [] to extraObjects: produces a yaml parse error. two edits are required, but only one is obvious.
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.
Summary
Adds an optional top-level
extraObjectsvalue that renders arbitrary Kubernetes manifests within the kagent chart. It is empty by default so existing installs stay unaffected. Each entry is rendered throughtplso 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
ExternalSecretorHTTPRoutein the same chart lifecycle. It follows a common pattern used by community charts such as:Changes
templates/extra-objects.yamlranging over.Values.extraObjects(default[]).extraObjectsinvalues.yamlwith anExternalSecretexample.tests/extra-objects_test.yaml.Testing
helm unittest helm/kagentpasses. The new suite covers the empty default map entries multiple documentstplevaluation 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.