Skip to content

Template some config settings#53

Open
mohag wants to merge 4 commits intokafbat:mainfrom
mohag:main
Open

Template some config settings#53
mohag wants to merge 4 commits intokafbat:mainfrom
mohag:main

Conversation

@mohag
Copy link
Copy Markdown

@mohag mohag commented Sep 1, 2025

Template the config settings that can be used to configure the cluster that kafka-ui talks to.

Happened to clean up a bit of trailing whitespace.

Partially addresses #52. (the parts that I need and a few similar settings)

Summary by CodeRabbit

  • Bug Fixes

    • Improved Helm template rendering so environment variables, config maps/secrets, ingress hosts, and volume/mount settings are properly evaluated, quoted, and substituted during deployment to prevent misconfiguration.
  • Chores

    • Bumped Helm chart version to 1.6.4.

@mohag mohag requested a review from a team as a code owner September 1, 2025 14:51
@Haarolean
Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd0fa83b-1001-457f-ba19-f36c55ca0c67

📥 Commits

Reviewing files that changed from the base of the PR and between dce4d9e and 0ebad22.

📒 Files selected for processing (2)
  • charts/kafka-ui/templates/deployment.yaml
  • charts/kafka-ui/templates/ingress.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • charts/kafka-ui/templates/ingress.yaml
  • charts/kafka-ui/templates/deployment.yaml

📝 Walkthrough

Walkthrough

Helm chart version incremented to 1.6.4. Deployment and Ingress templates now render several user-supplied values with Helm tpl and emit many evaluated strings wrapped in quote; minor YAML formatting normalized.

Changes

Cohort / File(s) Summary
Chart metadata
charts/kafka-ui/Chart.yaml
Chart version updated from 1.6.3 to 1.6.4.
Deployment template
charts/kafka-ui/templates/deployment.yaml
Applied tpl rendering to user-supplied YAML (.Values.env, .Values.volumeMounts, .Values.volumes) via tpl (toYaml .) $; ran names/keys for YAML app config, envs.secretMappings, envs.configMappings, and envFrom existing config/secret through tpl and quote; preserved required checks inside tpl; minor configMap YAML normalization.
Ingress template
charts/kafka-ui/templates/ingress.yaml
Ingress spec.tls[].hosts and spec.rules[].host now emit evaluated host values using tpl and quote (e.g., `{{ tpl .Values.ingress.host .

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through templates, soft and spry,
tpl and quotes made hosts comply,
Bumped the chart to one six four,
Env and volumes tweaked once more,
A tiny hop — YAML sigh ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Template some config settings' is vague and does not clearly convey the specific changes made to the Helm chart templates. Use a more descriptive title that specifies which configuration settings are being templated, such as 'Add template rendering for ingress hosts and volume configuration' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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/deployment.yaml (1)

102-102: Quote templated resource names for YAML scalar safety and consistency.

Line 94 already quotes templated existingConfigMap; doing the same for Line 102, Line 171, and Line 176 avoids edge-case YAML coercion.

♻️ Proposed refactor
-                name: {{ tpl .Values.existingSecret . }}
+                name: {{ tpl .Values.existingSecret . | quote }}
...
-            name: {{ tpl .Values.yamlApplicationConfigConfigMap.name . }}
+            name: {{ tpl .Values.yamlApplicationConfigConfigMap.name . | quote }}
...
-            secretName: {{ tpl .Values.yamlApplicationConfigSecret.name . }}
+            secretName: {{ tpl .Values.yamlApplicationConfigSecret.name . | quote }}

Also applies to: 171-171, 176-176

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

In `@charts/kafka-ui/templates/deployment.yaml` at line 102, The YAML scalar for
templated resource names should be quoted to avoid coercion issues: update the
occurrences that use the tpl helper with .Values.existingSecret (and the other
two occurrences noted for existingConfigMap/existingSecret) so they are rendered
as quoted strings; for example change name: {{ tpl .Values.existingSecret . }}
to name: "{{ tpl .Values.existingSecret . }}" and do the same for the other
templated instances (the tpl usages around existingConfigMap and existingSecret
at the referenced locations).
🤖 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/templates/deployment.yaml`:
- Around line 70-72: The Helm template pipelines call tpl before default which
can fail when keyName is unset; change the pipelines to apply default first then
pass that to tpl so the fallback "config.yml" is used: for both occurrences
referencing .Values.yamlApplicationConfigConfigMap.keyName and
.Values.yamlApplicationConfigSecret.keyName, wrap each keyName with default
"config.yml" (i.e. default .Values...keyName "config.yml") and then call tpl on
that result instead of tpl on the raw keyName.
- Around line 160-162: The volumes block misuses tpl on the object
.Values.volumes which stringifies it and breaks YAML; change the block to mirror
the env pattern (use with .Values.volumes and pass the object directly to toYaml
then nindent) instead of applying tpl — update the template surrounding
.Values.volumes so it uses {{- with .Values.volumes }} then {{- toYaml . |
nindent 8 }} and {{- end }}, leaving tpl only for actual template strings.

---

Nitpick comments:
In `@charts/kafka-ui/templates/deployment.yaml`:
- Line 102: The YAML scalar for templated resource names should be quoted to
avoid coercion issues: update the occurrences that use the tpl helper with
.Values.existingSecret (and the other two occurrences noted for
existingConfigMap/existingSecret) so they are rendered as quoted strings; for
example change name: {{ tpl .Values.existingSecret . }} to name: "{{ tpl
.Values.existingSecret . }}" and do the same for the other templated instances
(the tpl usages around existingConfigMap and existingSecret at the referenced
locations).
🪄 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: d1aaecda-e71b-4057-8335-5bd4c2553eba

📥 Commits

Reviewing files that changed from the base of the PR and between eace7b6 and f28acc1.

📒 Files selected for processing (2)
  • charts/kafka-ui/Chart.yaml
  • charts/kafka-ui/templates/deployment.yaml

Comment thread charts/kafka-ui/templates/deployment.yaml Outdated
Comment thread charts/kafka-ui/templates/deployment.yaml Outdated
Copy link
Copy Markdown
Member

@Haarolean Haarolean left a comment

Choose a reason for hiding this comment

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

please address coderabbit comments

@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 8, 2026

please address coderabbit comments

I'll have a look over the next few days. (I likely need to test the issues and fixes)

@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 16, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 1

🤖 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/templates/deployment.yaml`:
- Around line 100-102: The templated secret name produced by tpl
(.Values.existingSecret .) is emitted as an unquoted YAML scalar which can be
mis-parsed for values like "on"/"yes"/"true"; update the deployment template to
emit a quoted string by wrapping the tpl call with Helm's quote function (i.e.,
use quote (tpl .Values.existingSecret .)) for the secretRef.name so the rendered
name is always a proper YAML string; mirror the same quoting approach used for
existingConfigMap to ensure consistency.
🪄 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: a0959b64-2cb9-4d65-b6b7-07c3a1b09659

📥 Commits

Reviewing files that changed from the base of the PR and between b9c2ecf and 7488f09.

📒 Files selected for processing (2)
  • charts/kafka-ui/Chart.yaml
  • charts/kafka-ui/templates/deployment.yaml
✅ Files skipped from review due to trivial changes (1)
  • charts/kafka-ui/Chart.yaml

Comment thread charts/kafka-ui/templates/deployment.yaml Outdated
@mohag mohag requested a review from Haarolean April 16, 2026 08:00
@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 16, 2026

I'm not sure where to view the requested changes. (I did rebase on main to get rid of the conflicts, not sure if that got rid of them or if it was just the CodeRabbit issues)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 16, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 16, 2026

I thought the edit did not trigger it, deleted and then posted the correct message again, so probably hitting the rate limit again... Need to learn to refresh the issue to be sure I see the latest comments.

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: 1

🤖 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/templates/deployment.yaml`:
- Around line 173-181: The template currently calls tpl on
.Values.yamlApplicationConfigConfigMap.name and
.Values.yamlApplicationConfigSecret.name without validating presence; update
those tpl calls to use the required function around the name keys so Helm will
emit clear errors if name is missing (match the pattern already used elsewhere
in this file for yamlApplicationConfigConfigMap/name and
yamlApplicationConfigSecret/name), keeping the surrounding keys
(kafka-ui-yaml-conf-configmap and kafka-ui-yaml-conf-secret) intact and quoting
the result as before.
🪄 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: ccb3aa4c-0c5e-4c4c-9b8a-22da09a82341

📥 Commits

Reviewing files that changed from the base of the PR and between dce4d9e and 84f6fef.

📒 Files selected for processing (2)
  • charts/kafka-ui/templates/deployment.yaml
  • charts/kafka-ui/templates/ingress.yaml
✅ Files skipped from review due to trivial changes (1)
  • charts/kafka-ui/templates/ingress.yaml

Comment thread charts/kafka-ui/templates/deployment.yaml Outdated
@mohag
Copy link
Copy Markdown
Author

mohag commented Apr 20, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

2 participants