# grafana_charts_service-memcached-index-queries.yaml
{{- if .Values.memcachedIndexQueries.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "loki.memcachedIndexQueriesFullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "loki.memcachedIndexQueriesSelectorLabels" . | nindent 4 }}
    {{- with .Values.memcachedIndexQueries.serviceLabels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- with .Values.memcached.serviceAnnotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - name: memcached-client
      port: 11211
      targetPort: http
      protocol: TCP
      {{- if .Values.memcached.appProtocol }}
      appProtocol: {{ .Values.memcached.appProtocol }}
      {{- end }}
    - name: http-metrics
      port: 9150
      targetPort: http-metrics
      protocol: TCP
  selector:
    {{- include "loki.memcachedIndexQueriesSelectorLabels" . | nindent 4 }}
{{- end }}