Skip to content

Add service.annotations support#9

Open
TJM wants to merge 1 commit into
openspeedtest:mainfrom
TJM:feat/service-annotations
Open

Add service.annotations support#9
TJM wants to merge 1 commit into
openspeedtest:mainfrom
TJM:feat/service-annotations

Conversation

@TJM

@TJM TJM commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Add optional service.annotations rendering to templates/service.yaml, mirroring the existing pattern used by serviceAccount.annotations and podAnnotations. Bumps chart version 0.1.2 → 0.1.3.

Motivation

The Service rendered by this chart has no way to receive annotations, which blocks several real-world deployment patterns. The case that drove this: deploying the chart on GKE with a GCE Ingress fronting a ClusterIP Service requires the cloud.google.com/neg: '{\"ingress\": true}' annotation for container-native load balancing. Without service.annotations, the Ingress fails to translate with: service \"X\" is type \"ClusterIP\", expected \"NodePort\" or \"LoadBalancer\" when not using NEGs.

Other use cases: AWS NLB target-type annotations, MetalLB shared-IP annotations, Linkerd/Istio mesh annotations, internal-LB hints for cloud LBs.

Changes

  • templates/service.yaml — render metadata.annotations from .Values.service.annotations when non-empty (guarded by with).
  • values.yaml — add service.annotations: {} default with a commented example.
  • Chart.yaml — bump version: 0.1.20.1.3.

Backward compatible: the block is omitted when the map is empty, so existing installs produce identical YAML.

Test plan

  • helm lint passes
  • helm template with no annotations produces no annotations: block on the Service (identical to current behavior)
  • helm template with service.annotations.cloud.google.com/neg: '{"ingress": true}' renders the annotation correctly
  • End-to-end verified on a real GKE cluster: chart-deployed Service now carries the NEG annotation and the GCE Ingress translates successfully

Mirror the existing pattern used by serviceAccount.annotations and
podAnnotations so users can attach metadata.annotations to the Service.

Needed for GKE container-native LB (cloud.google.com/neg='{"ingress": true}')
when fronting a ClusterIP Service with a GCE Ingress.
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.

1 participant