helm icon indicating copy to clipboard operation
helm copied to clipboard

LoadBalancer Annotations Missing

Open cloudscape-germany opened this issue 3 years ago • 2 comments

templates/service.yaml

apiVersion: v1
kind: Service
metadata:
  name: {{ template "nextcloud.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "nextcloud.name" . }}
    helm.sh/chart: {{ include "nextcloud.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/component: app
spec:
  type: {{ .Values.service.type }}
  {{- if eq .Values.service.type "LoadBalancer" }}
  loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
  {{- end }}
  ports:
  - port: {{ .Values.service.port }}
    targetPort: http
    protocol: TCP
    name: http
    {{- if eq .Values.service.type "NodePort" }}
    nodePort: {{ default "" .Values.service.nodePort}}
    {{- end }}
  selector:
    app.kubernetes.io/name: {{ include "nextcloud.name" . }}
    app.kubernetes.io/component: app

We need LB annotations in the service spec of this chart.

Any other ideas than PR?

As a workaround:

  1. helm dependency update
  2. Deploy chart from local

cloudscape-germany avatar Jan 17 '22 20:01 cloudscape-germany

Same problem for me .... I need service annotations to specify the external dns name. I've tried to set it like:

service:
  loadBalancerIP: ''
  nodePort: nil
  port: 80
  type: LoadBalancer
  annotations:
    external-dns.alpha.kubernetes.io/hostname: nextcloud

but the helm chart is not prepared to interpret it. .... Pls add!

XtraLarge avatar Jan 27 '24 07:01 XtraLarge

This seems easy enough. Anyone in this issue or the great community: Please feel free to submit a PR for this and then reference this issue in it :)

Remember to please update the values.yaml with new values, the README.md with new docs, and the Chart.yaml with a version bump.

jessebot avatar May 01 '24 11:05 jessebot