trinodb / charts

Apache License 2.0
133 stars 149 forks source link

Support annotations for the Service resource #145

Closed ilyas1uphealth closed 1 month ago

ilyas1uphealth commented 2 months ago

Edit: Created a PR: https://github.com/trinodb/charts/pull/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.

ilyas1uphealth commented 2 months ago

Created a PR: https://github.com/trinodb/charts/pull/149

nineinchnick commented 1 month ago

Fixed by #134