Add service annotations support to gateway chart#400
Open
varunarya002 wants to merge 4 commits intotrinodb:mainfrom
Open
Add service annotations support to gateway chart#400varunarya002 wants to merge 4 commits intotrinodb:mainfrom
varunarya002 wants to merge 4 commits intotrinodb:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for setting annotations on the Trino Gateway Service resource. It also ensures that annotations added to the Service metadata do not unintentionally leak into the Service
spec.Motivation
In many Kubernetes environments (like AWS EKS, GCP GKE, or Azure AKS), exposing the Trino Gateway using a
LoadBalancerservice type requires setting specific annotations on the Service object (e.g.,service.beta.kubernetes.io/load-balancer-type: externalor AWS ACM certificate ARNs).Previously, the gateway chart passed the entire
serviceblock fromvalues.yamldirectly into the Servicespec, meaningannotationscould not be cleanly defined in the metadata without leaking into the spec and causing validation errors.Changes
service.annotationstovalues.yamlwith an empty default.templates/service.yamlto dynamically render annotations undermetadata.unsetlogic intemplates/service.yamlto strip theannotationskey from the$specdictionary before rendering it into the Servicespec.helm test(test-service-annotations.yaml) that uses the Kubernetes API to validate that:spec.Testing Done
helm templateto ensure clean separation of metadata and spec.helm testagainst a live cluster. The test uses a Python script (viaurllib) executed from a Pod with a least-privilegeServiceAccountto query the Kubernetes API directly.