{{- if .Values.trivy.enabled -}}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "chart.resourceNamePrefix" . }}trivy
  labels:
    app.kubernetes.io/component: trivy
    {{- include "chart.labels" . | nindent 4 }}
spec:
  type: ClusterIP
  ports:
    - port: 8081
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/component: trivy
    {{- include "chart.selectorLabels" . | nindent 4 }}
{{- end }}
