trinodb / charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support annotations for the Service resource

ilyas1uphealth opened this issue · comments

Edit: Created a PR: #149

When using aws-load-balancer-controller, it is useful to pass annotations in the Service ( https://github.com/trinodb/charts/blob/trino-0.19.0/charts/trino/templates/service.yaml ) to denote what properties the load balancer could have.

Proposed solution:
From https://github.com/trinodb/charts/blob/trino-0.19.0/charts/trino/values.yaml#L226

service:
  type: ClusterIP
  port: 8080
  annotations: {} # <--------- this field is new

From https://github.com/trinodb/charts/blob/trino-0.19.0/charts/trino/templates/service.yaml

metadata:
name: {{ template "trino.fullname" . }}
labels:
  app: {{ template "trino.name" . }}
  chart: {{ template "trino.chart" . }}
  release: {{ .Release.Name }}
  heritage: {{ .Release.Service }}
####### 
# This section is new
########
{{- with .Values.service.annotations }}
annotations:
  {{- toYaml . | nindent 4 }}
{{- end }}
####### 
# /This section is new
########
spec:

I could make a pull request if you'd like.

Created a PR: #149

Fixed by #134