apiVersion: v1
kind: Service
metadata:
  name: {{ include "sachet.fullname" . }}
  namespace: {{ include "sachet.namespace" . }}
  labels: {{ include "sachet.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: http
      protocol: TCP
      name: http
      {{- if contains "NodePort" .Values.service.type }}
      nodePort: {{ .Values.service.nodePort }}
      {{- end }}
  selector: {{ include "sachet.selectorLabels" . | nindent 4 }}