26 lines
818 B
YAML
26 lines
818 B
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" . }}
|