trinodb / charts

Apache License 2.0
133 stars 149 forks source link

Add annotations templating for service #149

Closed ilyas1uphealth closed 2 months ago

ilyas1uphealth commented 2 months ago

Primarily to support Load Balancer annotations in AWS, which are defined here. https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/ingress/annotations/

Here are some examples, from within the charts/trino directory:

helm template . -f values.yaml | grep "kind: Service" -A 20 -B 3

---
# Source: trino/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-trino
  namespace: default
  labels:
    app: trino
    chart: trino-0.19.0
    release: release-name
    heritage: Helm
spec:
  type: ClusterIP
  ports:
    - port: 8080
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app: trino
    release: release-name
    component: coordinator
---

And with some annotations set:

helm template . -f values.yaml --set service.annotations.foo=boo --set service.annotations.bar=baz | grep "kind: Service" -A 23 -B 3 

---
# Source: trino/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-trino
  namespace: default
  labels:
    app: trino
    chart: trino-0.19.0
    release: release-name
    heritage: Helm
  annotations:
    bar: baz
    foo: boo
spec:
  type: ClusterIP
  ports:
    - port: 8080
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app: trino
    release: release-name
    component: coordinator
---

In practice this would be combined with type: LoadBalancer, but the addition of annotations does not itself require this use case so it would be unnecessary to restrict it.

cla-bot[bot] commented 2 months ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ilyas Aricanli. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
cla-bot[bot] commented 2 months ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ilyas Aricanli. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
cla-bot[bot] commented 2 months ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ilyas Aricanli. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
ilyas1uphealth commented 2 months ago

It seems upset with me, I'm going to close this, figure out the email details, and re-open later