# grafana_charts_service-memcached-frontend.yaml
{{- if .Values.memcachedFrontend.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "loki.memcachedFrontendFullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "loki.memcachedFrontendSelectorLabels" . | nindent 4 }}
    {{- with .Values.memcachedFrontend.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.memcachedFrontendSelectorLabels" . | nindent 4 }}
{{- end }}