Skip to content

feat: extraManifests support#66

Open
korjek wants to merge 1 commit into
kafbat:mainfrom
korjek:feat/extra-resources-support
Open

feat: extraManifests support#66
korjek wants to merge 1 commit into
kafbat:mainfrom
korjek:feat/extra-resources-support

Conversation

@korjek
Copy link
Copy Markdown

@korjek korjek commented Apr 23, 2026

this allows to declare arbitrary kubernetes resources.

Fixes #57

Summary by CodeRabbit

  • New Features

    • Added extraManifests parameter enabling users to deploy arbitrary Kubernetes resources through Helm chart configuration values. This provides flexible resource management without requiring direct template modifications.
  • Documentation

    • Configuration documentation updated to include documentation for the new extraManifests parameter.

@korjek korjek requested a review from a team as a code owner April 23, 2026 10:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

This change adds support for injecting arbitrary Kubernetes manifests into the Helm chart via a new extraObjects parameter. The feature enables users to specify additional resources directly in values.yaml without maintaining custom overlays. The chart version is bumped to 1.7.0, and implementation spans configuration documentation, values definition, and a new template file.

Changes

Cohort / File(s) Summary
Chart metadata
charts/kafka-ui/Chart.yaml
Version bumped from 1.6.4 to 1.7.0 to reflect the new feature addition.
Configuration and values
charts/kafka-ui/CONFIGURATION.md, charts/kafka-ui/values.yaml
Documentation and parameter definition for new extraObjects configuration, defaulting to empty array for user-supplied arbitrary Kubernetes objects.
Template implementation
charts/kafka-ui/templates/extra-manifests.yaml
New template file that iterates over .Values.extraObjects, conditionally applies template processing (handling both string and YAML-formatted entries), and outputs manifests separated by YAML document boundaries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A chart that's more flexible now,
With extraObjects here somehow,
Deploy what you need, side by side,
Custom manifests, nowhere to hide! ✨
No forks or overlays required,
Your Kubernetes dreams, now inspired!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'feat: extraManifests support' refers to the template file 'extra-manifests.yaml', but the actual feature is about 'extraObjects' which is the parameter name throughout the codebase (values.yaml, CONFIGURATION.md, and the template logic). The title is partially related but uses a different naming convention than the implementation. Consider clarifying the title to use 'extraObjects' to match the actual parameter name used in the implementation, or ensure consistency across documentation and code.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully implements the feature request from issue #57 by adding extraObjects support to enable users to inject arbitrary Kubernetes resources via chart values, matching the core requirement.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the extraObjects feature: configuration documentation, template implementation, chart version bump, and values definition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
charts/kafka-ui/templates/extra-manifests.yaml (1)

1-8: Consider guarding the template and cleaning up whitespace.

A couple of minor polish items:

  1. When .Values.extraObjects is empty (the default), this template still renders a file containing only blank lines. That's harmless for helm install, but it's cleaner to wrap the body in {{- if .Values.extraObjects }} so no output is produced at all.
  2. Whitespace control is inconsistent ({{ range }} vs {{- if }}), which leaves stray blank lines between documents. Using {{- / -}} consistently produces tidier rendered manifests, which helps when users inspect helm template output or diff rendered manifests.
♻️ Suggested cleanup
-{{ range .Values.extraObjects }}
----
-{{- if typeIs "string" . }}
-{{ tpl . $ }}
-{{ else }}
-{{ tpl (. | toYaml) $ }}
-{{- end }}
-{{ end }}
+{{- if .Values.extraObjects }}
+{{- range .Values.extraObjects }}
+---
+{{- if typeIs "string" . }}
+{{ tpl . $ }}
+{{- else }}
+{{ tpl (toYaml .) $ }}
+{{- end }}
+{{- end }}
+{{- end }}

Note: the YAMLlint error reported on line 3 is a false positive — it's attempting to parse Go template directives as YAML. Safe to ignore.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/kafka-ui/templates/extra-manifests.yaml` around lines 1 - 8, Wrap the
template body with a guard checking .Values.extraObjects (e.g., add an if around
the existing {{ range .Values.extraObjects }} block) so nothing is emitted when
extraObjects is empty, and normalize whitespace control by switching template
delimiters to the trimmed form (use {{- and -}} consistently for {{ if }}, {{
range }}, and the end tags) so tpl and toYaml output don't leave stray blank
lines between documents; update the {{ range .Values.extraObjects }}, {{- if ...
}}, tpl and toYaml usages accordingly to produce no output when empty and tidier
rendered manifests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@charts/kafka-ui/CONFIGURATION.md`:
- Line 15: Update the CONFIGURATION.md table entry for the extraObjects
parameter so its description matches values.yaml and is more precise: replace
"Arbitrary K8s resources" with wording like "Array of extra Kubernetes manifests
to deploy" (or "Arbitrary Kubernetes spec" if you prefer to mirror values.yaml
exactly). Ensure the change refers to the same parameter name extraObjects and,
if CONFIGURATION.md is generated from `@param` comments in values.yaml, update the
`@param` description in values.yaml instead to avoid future drift.

In `@charts/kafka-ui/values.yaml`:
- Around line 297-299: The extraObjects entry is placed under the implicit
Scheduling section but CONFIGURATION.md documents it under Common; move the
extraObjects: [] block (the parameter named extraObjects) into the Common
section or add an explicit section header (for example add a new "## `@section`
Extra Deploy" immediately before the extraObjects param) so the `@param/`@section
annotations match the documentation generator; update the surrounding
comment/annotation so the readme-generator will keep extraObjects in the
intended section.

---

Nitpick comments:
In `@charts/kafka-ui/templates/extra-manifests.yaml`:
- Around line 1-8: Wrap the template body with a guard checking
.Values.extraObjects (e.g., add an if around the existing {{ range
.Values.extraObjects }} block) so nothing is emitted when extraObjects is empty,
and normalize whitespace control by switching template delimiters to the trimmed
form (use {{- and -}} consistently for {{ if }}, {{ range }}, and the end tags)
so tpl and toYaml output don't leave stray blank lines between documents; update
the {{ range .Values.extraObjects }}, {{- if ... }}, tpl and toYaml usages
accordingly to produce no output when empty and tidier rendered manifests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e10caade-acbc-4657-8eab-b46e7a7676b0

📥 Commits

Reviewing files that changed from the base of the PR and between 8f38cec and e1e3f11.

📒 Files selected for processing (4)
  • charts/kafka-ui/CONFIGURATION.md
  • charts/kafka-ui/Chart.yaml
  • charts/kafka-ui/templates/extra-manifests.yaml
  • charts/kafka-ui/values.yaml

Comment thread charts/kafka-ui/CONFIGURATION.md Outdated
Comment thread charts/kafka-ui/values.yaml Outdated
this allow to declare arbitraty kubernetes resources.

Fixes kafbat#57
@korjek korjek force-pushed the feat/extra-resources-support branch from e1e3f11 to 5fd8fca Compare April 23, 2026 10:55
@korjek korjek changed the title feat: extraObjects support feat: extraManifests support Apr 23, 2026
@Haarolean Haarolean self-requested a review April 30, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add support for extraDeploy in Helm chart

1 participant