# grafana_charts_ruler-svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ template "enterprise-metrics.fullname" . }}-ruler
  labels:
    app: {{ template "enterprise-metrics.name" . }}-ruler
    chart: {{ template "enterprise-metrics.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
    {{- with .Values.ruler.labels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  annotations:
    {{- toYaml .Values.ruler.annotations | nindent 4 }}
spec:
  type: ClusterIP
  ports:
    - port: {{ .Values.config.server.http_listen_port }}
      protocol: TCP
      name: http-metrics
      targetPort: http-metrics
  selector:
    app: {{ template "enterprise-metrics.name" . }}-ruler
    release: {{ .Release.Name }}