--- apiVersion: v1 kind: Service metadata: name: {{ template "nextcloud.fullname" . }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} 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") }} {{- with .Values.service.loadBalancerIP }} loadBalancerIP: {{ . }} {{- end }} {{- end }} {{- with .Values.service.ipFamilies }} ipFamilies: {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ . }} {{- end }} ports: - port: {{ .Values.service.port }} targetPort: {{ .Values.nextcloud.containerPort }} protocol: TCP name: http {{- with .Values.service.nodePort }} nodePort: {{ . }} {{- end }} selector: app.kubernetes.io/name: {{ include "nextcloud.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: app