apiVersion: v1
kind: Service
metadata:
  name: {{ include "gohoarder.fullname" . }}-server
  labels:
    {{- include "gohoarder.server.labels" . | nindent 4 }}
  {{- with .Values.server.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.server.service.type }}
  ports:
    - port: {{ .Values.server.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    {{- include "gohoarder.server.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "gohoarder.fullname" . }}-frontend
  labels:
    {{- include "gohoarder.frontend.labels" . | nindent 4 }}
  {{- with .Values.frontend.service.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: {{ .Values.frontend.service.type }}
  ports:
    - port: {{ .Values.frontend.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    {{- include "gohoarder.frontend.selectorLabels" . | nindent 4 }}
