--- apiVersion: v1 kind: Service metadata: name: {{ include "ntfy.fullname" . }} labels: {{- include "ntfy.labels" . | nindent 4 }} type: http spec: type: {{ .Values.service.http.type }} ports: - port: {{ .Values.service.http.port }} targetPort: http protocol: TCP name: http {{- if .Values.ntfy.metrics.enable }} - port: {{ .Values.ntfy.metrics.port }} targetPort: metrics protocol: TCP name: metrics {{- end }} selector: {{- include "ntfy.selectorLabels" . | nindent 4 }} {{- if .Values.service.smtp.enabled }} --- apiVersion: v1 kind: Service metadata: name: {{ include "ntfy.fullname" . }}-smtp labels: {{- include "ntfy.labels" . | nindent 4 }} type: smtp spec: type: {{ .Values.service.smtp.type }} ports: - port: {{ .Values.service.smtp.port }} targetPort: smtp protocol: TCP name: smtp selector: {{- include "ntfy.selectorLabels" . | nindent 4 }} {{- end }}