apiVersion: v1
kind: Service
metadata:
  name: {{ template "risk-advisor.fullname" . }}
  labels:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    app: "{{ template "risk-advisor.name" . }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  type: {{ .Values.service.type }}
  ports:
  - name: http
    protocol: TCP
    port: {{ .Values.service.port }}
    targetPort: {{ .Values.service.targetPort }}
    nodePort: {{ .Values.service.nodePort }}
  selector:
    app: "{{ template "risk-advisor.name" . }}"
    release: "{{ .Release.Name }}"
