60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
{{- with (.Values.metaMonitoring).grafanaAgent }}
|
|
{{- if .enabled }}
|
|
apiVersion: monitoring.grafana.com/v1alpha1
|
|
kind: GrafanaAgent
|
|
metadata:
|
|
name: {{ include "mimir.resourceName" (dict "ctx" $ "component" "meta-monitoring") }}
|
|
namespace: {{ .namespace | default $.Release.Namespace | quote }}
|
|
labels:
|
|
{{- include "mimir.labels" (dict "ctx" $ "component" "meta-monitoring" ) | nindent 4 }}
|
|
{{- with .labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ include "mimir.serviceAccountName" $ }}
|
|
{{- with .podSecurityContext }}
|
|
securityContext:
|
|
{{- . | toYaml | nindent 4 }}
|
|
{{- end }}
|
|
containers:
|
|
# The container specs here are merged with the ones in the operator using a strategic merge patch.
|
|
- name: config-reloader
|
|
{{- if .imageRepo }}{{ if .imageRepo.configReloader }}
|
|
{{- with .imageRepo.configReloader }}
|
|
image: {{ .repo }}/{{ .image }}:{{ .tag }}
|
|
{{- end }}
|
|
{{- end }}{{ end }}
|
|
{{- with .containerSecurityContext }}
|
|
securityContext:
|
|
{{- . | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
- name: grafana-agent
|
|
{{- if .imageRepo }}{{ if .imageRepo.grafanaAgent }}
|
|
{{- with .imageRepo.grafanaAgent }}
|
|
image: {{ .repo }}/{{ .image }}:{{ .tag }}
|
|
{{- end }}
|
|
{{- end }}{{ end }}
|
|
{{- with .containerSecurityContext }}
|
|
securityContext:
|
|
{{- . | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
|
|
logs:
|
|
instanceSelector:
|
|
matchLabels:
|
|
{{- include "mimir.selectorLabels" (dict "ctx" $ "component" "meta-monitoring") | nindent 8 }}
|
|
# cluster label for logs is added in the LogsInstance
|
|
metrics:
|
|
scrapeInterval: {{ .metrics.scrapeInterval }}
|
|
instanceSelector:
|
|
matchLabels:
|
|
{{- include "mimir.selectorLabels" (dict "ctx" $ "component" "meta-monitoring") | nindent 8 }}
|
|
externalLabels:
|
|
cluster: {{ include "mimir.clusterName" $ }}
|
|
{{- end }}
|
|
{{- end }}
|