Skip to content

Add support for AWS LoadBalancer service annotations to UI Service#1634

Open
rla8127 wants to merge 3 commits intokagent-dev:mainfrom
rla8127:feat/support-aws-load-balancer-annotations
Open

Add support for AWS LoadBalancer service annotations to UI Service#1634
rla8127 wants to merge 3 commits intokagent-dev:mainfrom
rla8127:feat/support-aws-load-balancer-annotations

Conversation

@rla8127
Copy link
Copy Markdown

@rla8127 rla8127 commented Apr 7, 2026

Before applying the Helm chart change

Service annotations for AWS LoadBalancer could not be configured through Helm values.
AWS LoadBalancer-specific settings were not applied even when custom annotations were needed.

Before change – screenshot 1

capture 2026-04-07 134342 AWS LoadBalancer annotations are not exposed through the Helm chart values.

Before change – screenshot 2

image The generated Service resource does not include AWS LoadBalancer annotations.

After applying the Helm chart change

# kagent/templates/ui-service.yml

apiVersion: v1
kind: Service
metadata:
  name: {{ include "kagent.fullname" . }}-ui
  namespace: {{ include "kagent.namespace" . }}
  labels:
    {{- include "kagent.ui.labels" . | nindent 4 }}
  {{- with .Values.ui.service.annotations }} ############# add
  annotations: ############## add
    {{- toYaml . | nindent 4 }} ############# add
  {{- end }} ############## add
spec:
  type: {{ .Values.ui.service.type }}
  ports:
    - port: {{ .Values.ui.service.ports.port }}
      targetPort: {{ .Values.ui.service.ports.targetPort }}
      protocol: TCP
      name: ui
  selector:
    {{- include "kagent.ui.selectorLabels" . | nindent 4 }}

my custom kagent values.yaml

ui:
  service:
    type: LoadBalancer
    annotations:
      #### https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.13/guide/service/annotations/
      service.beta.kubernetes.io/aws-load-balancer-name: kagent-dashboard
      service.beta.kubernetes.io/aws-load-balancer-type: external
      service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
      service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
      service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'

Added support for service.annotations in the Helm chart.
AWS LoadBalancer annotations can now be configured through Helm values.
The generated Service resource correctly includes AWS LoadBalancer annotations.

After change – screenshot 1

image AWS LoadBalancer annotations are configured through Helm values.

After change – screenshot 2

image The generated Service resource includes the configured AWS LoadBalancer annotations and the expected LoadBalancer behavior is applied.

rla8127 added 2 commits April 7, 2026 13:34
feat: add service annotations support for AWS LoadBalancer

Signed-off-by: Hyun <114461362+rla8127@users.noreply.github.com>
feat: add service annotations support for AWS LoadBalancer

Signed-off-by: Hyun <114461362+rla8127@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 7, 2026 04:47
Copy link
Copy Markdown
Contributor

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 service annotations through Helm values for the UI service, enabling users to apply cloud provider-specific configurations (such as AWS LoadBalancer annotations) to the Kubernetes Service resource.

Changes:

  • Added annotations: {} field to the ui.service configuration in values.yaml to allow users to specify custom service annotations
  • Updated the ui-service.yaml template to conditionally render annotations when provided in the values, using the standard Helm pattern with {{- with }} blocks

Reviewed changes

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

File Description
helm/kagent/values.yaml Added annotations field to ui.service section with empty object as default
helm/kagent/templates/ui-service.yaml Added conditional annotations block using Helm's with directive to render annotations when provided

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

@EItanya EItanya changed the title Add support for AWS LoadBalancer service annotations Add support for AWS LoadBalancer service annotations to UI Service Apr 8, 2026
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