You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.9 KiB
107 lines
3.9 KiB
3 years ago
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: {{ include "nfs-provisioner.fullname" . }}
|
||
|
labels:
|
||
|
app: {{ include "nfs-provisioner.name" . }}
|
||
|
chart: {{ include "nfs-provisioner.chart" . }}
|
||
|
heritage: {{ .Release.Service }}
|
||
|
release: {{ .Release.Name }}
|
||
|
spec:
|
||
|
type: {{ .Values.service.type }}
|
||
|
ports:
|
||
|
- port: {{ .Values.service.nfsPort }}
|
||
|
targetPort: nfs
|
||
|
protocol: TCP
|
||
|
name: nfs
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nfsNodePort))) }}
|
||
|
nodePort: {{ .Values.service.nfsNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.nfsPort }}
|
||
|
targetPort: nfs-udp
|
||
|
protocol: UDP
|
||
|
name: nfs-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nfsNodePort))) }}
|
||
|
nodePort: {{ .Values.service.nfsNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.nlockmgrPort }}
|
||
|
targetPort: nlockmgr
|
||
|
protocol: TCP
|
||
|
name: nlockmgr
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nlockmgrNodePort))) }}
|
||
|
nodePort: {{ .Values.service.nlockmgrNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.nlockmgrPort }}
|
||
|
targetPort: nlockmgr-udp
|
||
|
protocol: UDP
|
||
|
name: nlockmgr-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nlockmgrPort))) }}
|
||
|
nodePort: {{ .Values.service.nlockmgrNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.mountdPort }}
|
||
|
targetPort: mountd
|
||
|
protocol: TCP
|
||
|
name: mountd
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.mountdNodePort))) }}
|
||
|
nodePort: {{ .Values.service.mountdNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.mountdPort }}
|
||
|
targetPort: mountd-udp
|
||
|
protocol: UDP
|
||
|
name: mountd-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.mountdNodePort))) }}
|
||
|
nodePort: {{ .Values.service.mountdNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.rquotadPort }}
|
||
|
targetPort: rquotad
|
||
|
protocol: TCP
|
||
|
name: rquotad
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.rquotadNodePort))) }}
|
||
|
nodePort: {{ .Values.service.rquotadNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.rquotadPort }}
|
||
|
targetPort: rquotad-udp
|
||
|
protocol: UDP
|
||
|
name: rquotad-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.rquotadNodePort))) }}
|
||
|
nodePort: {{ .Values.service.rquotadNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.rpcbindPort }}
|
||
|
targetPort: rpcbind
|
||
|
protocol: TCP
|
||
|
name: rpcbind
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.rpcbindNodePort))) }}
|
||
|
nodePort: {{ .Values.service.rpcbindNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.rpcbindPort }}
|
||
|
targetPort: rpcbind-udp
|
||
|
protocol: UDP
|
||
|
name: rpcbind-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.rpcbindNodePort))) }}
|
||
|
nodePort: {{ .Values.service.rpcbindNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.statdPort }}
|
||
|
targetPort: statd
|
||
|
protocol: TCP
|
||
|
name: statd
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.statdPort))) }}
|
||
|
nodePort: {{ .Values.service.statdNodePort }}
|
||
|
{{- end }}
|
||
|
- port: {{ .Values.service.statdPort }}
|
||
|
targetPort: statd-udp
|
||
|
protocol: UDP
|
||
|
name: statd-udp
|
||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.statdPort))) }}
|
||
|
nodePort: {{ .Values.service.statdNodePort }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.service.clusterIP }}
|
||
|
clusterIP: {{ . }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.service.externalIPs }}
|
||
|
externalIPs:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
app: {{ include "nfs-provisioner.name" . }}
|
||
|
release: {{ .Release.Name }}
|