{{- if .Values.agents.tune.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: tune-service-{{ .Release.Name }}
  namespace: {{ .Release.Namespace }}
spec:
  type: {{ .Values.agents.tune.service.type }}
  selector:
    app: tune-{{ .Release.Name }}
  ports:
    - port: 8100
      targetPort: 8100
      {{- if (and (eq .Values.agents.tune.service.type "") .Values.agents.tune.service.nodePort) }}
      nodePort: {{ .Values.agents.tune.service.nodePort }}
      {{- end }}
{{- end }}