Skip to content

Conversation

@Sekkala
Copy link

@Sekkala Sekkala commented Nov 26, 2024

We want to make it possible to add service Labels from values.yaml under service.labels

@Sekkala Sekkala requested a review from a team as a code owner November 26, 2024 12:06
@Sekkala
Copy link
Author

Sekkala commented Dec 9, 2024

Hi @azatsafin, can you please take a look at this PR. Thank you very much!

@germanosin
Copy link
Member

@azatsafin don't you mind to check it?

@Sekkala
Copy link
Author

Sekkala commented Jan 10, 2025

@azatsafin, when you find the time can you review this PR. Thank you.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for configuring custom labels on the Kafka-UI service resource via the service.labels parameter in values.yaml. The implementation follows the existing pattern used for ingress labels in the same chart.

Key Changes:

  • Added service.labels parameter to values.yaml with an empty object as the default
  • Updated service.yaml template to merge custom labels with default labels
  • Documented the new parameter in README.md

Reviewed changes

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

File Description
charts/kafka-ui/values.yaml Adds service.labels parameter with documentation comment
charts/kafka-ui/templates/service.yaml Updates metadata section to include custom labels from values
charts/kafka-ui/README.md Documents the new service.labels parameter in the Traffic Exposure Parameters table

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

Comment on lines +8 to 13
{{- if .Values.service.labels }}
{{- toYaml .Values.service.labels | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | nindent 4 }}
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

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

The conditional logic here uses if with explicit variable checking, but the ingress template uses the with directive for the same pattern. For consistency with the existing codebase pattern (as seen in ingress.yaml lines 19-21), consider using with instead. The with directive is more idiomatic in Helm templates for this use case as it provides automatic empty-value checking and scopes the context.

Suggested change
{{- if .Values.service.labels }}
{{- toYaml .Values.service.labels | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | nindent 4 }}
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | nindent 4 }}

Copilot uses AI. Check for mistakes.
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `service.type` | Kafka-UI service type | `ClusterIP` |
| `service.port` | Kafka-UI pod port number | `80` |
| `service.labels` | Kafka-UI service Labels | `{}` |
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

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

Capitalization inconsistency: "Labels" should be lowercase "labels" to match the capitalization pattern used for other service and ingress parameters in the same table (see lines 67, 68, 70-72 where all other parameter descriptions use lowercase for common words).

Suggested change
| `service.labels` | Kafka-UI service Labels | `{}` |
| `service.labels` | Kafka-UI service labels | `{}` |

Copilot uses AI. Check for mistakes.
# loadBalancerIP: 10.11.12.13
# if you want to force a specific nodePort. Must be use with service.type=NodePort
# nodePort:
## @param service.labels kafka-UI service labels
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

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

Capitalization inconsistency: "kafka-UI" should be "Kafka-UI" (with capital K) to match the capitalization pattern used consistently throughout the file (see lines 186, 190, 192, and the ingress.labels comment on line 210).

Suggested change
## @param service.labels kafka-UI service labels
## @param service.labels Kafka-UI service labels

Copilot uses AI. Check for mistakes.
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.

3 participants