@ -1,39 +0,0 @@
|
||||
---
|
||||
apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: GrafanaDatasource
|
||||
metadata:
|
||||
name: alertmanager
|
||||
namespace: "{{ .Values.nfc_monitoring.grafana.namespace }}"
|
||||
labels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: alertmanager
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
spec:
|
||||
#secrets:
|
||||
# - credentials
|
||||
instanceSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: grafana
|
||||
allowCrossNamespaceImport: true
|
||||
datasource:
|
||||
name: alertmanager
|
||||
type: alertmanager
|
||||
access: proxy
|
||||
# basicAuth: true
|
||||
url: "http://alertmanager-main.{{ .Values.nfc_monitoring.alert_manager.namespace }}.svc:9093"
|
||||
isDefault: false
|
||||
# user: admin
|
||||
jsonData:
|
||||
"tlsSkipVerify": true
|
||||
"timeInterval": "5s"
|
||||
"implementation": prometheus
|
||||
"handleGrafanaManagedAlerts": false
|
||||
# "orgId": 1
|
||||
# secureJsonData:
|
||||
# "password": admin
|
||||
editable: true
|
@ -1,38 +0,0 @@
|
||||
---
|
||||
apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: GrafanaDatasource
|
||||
metadata:
|
||||
name: prometheus
|
||||
namespace: "{{ .Values.nfc_monitoring.grafana.namespace }}"
|
||||
labels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: prometheus
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
spec:
|
||||
#secrets:
|
||||
# - credentials
|
||||
instanceSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: grafana
|
||||
allowCrossNamespaceImport: true
|
||||
datasource:
|
||||
name: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
# basicAuth: true
|
||||
url: "http://prometheus-k8s.{{ .Values.nfc_monitoring.prometheus.namespace }}.svc:9090"
|
||||
isDefault: true
|
||||
# user: admin
|
||||
jsonData:
|
||||
# "tlsSkipVerify": true
|
||||
manageAlerts: true
|
||||
"timeInterval": "5s"
|
||||
"orgId": 1
|
||||
# secureJsonData:
|
||||
# "password": admin
|
||||
editable: true
|
@ -1,41 +0,0 @@
|
||||
---
|
||||
{{- if .Values.nfc_monitoring.loki.enabled | default false -}}
|
||||
|
||||
apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: GrafanaDatasource
|
||||
metadata:
|
||||
name: loki
|
||||
namespace: "{{ .Values.nfc_monitoring.grafana.namespace }}"
|
||||
labels:
|
||||
aapp.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: loki
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
spec:
|
||||
#secrets:
|
||||
# - credentials
|
||||
instanceSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: grafana
|
||||
allowCrossNamespaceImport: true
|
||||
datasource:
|
||||
name: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
# basicAuth: true
|
||||
url: "http://{{ .Values.nfc_monitoring.loki.service_name }}.{{ .Values.nfc_monitoring.loki.namespace }}.svc.{{ .Values.nfc_monitoring.kubernetes.cluster_dns_name }}:{{ .Values.nfc_monitoring.loki.service_port }}"
|
||||
isDefault: false
|
||||
# user: admin
|
||||
jsonData:
|
||||
# "tlsSkipVerify": true
|
||||
"timeInterval": "5s"
|
||||
"orgId": 1
|
||||
# secureJsonData:
|
||||
# "password": admin
|
||||
editable: true
|
||||
|
||||
{{- end -}}
|
28
templates/GrafanaDatasources.yaml
Normal file
28
templates/GrafanaDatasources.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: GrafanaDatasourceList
|
||||
items:
|
||||
{{ range .Values.nfc_monitoring.grafana.DataSources }}
|
||||
- apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: GrafanaDatasource
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: "{{ $.Values.nfc_monitoring.grafana.namespace }}"
|
||||
labels:
|
||||
app.kubernetes.io/component: dashboard
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: grafana
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
spec:
|
||||
instanceSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: graphing
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/name: grafana
|
||||
allowCrossNamespaceImport: true
|
||||
datasource:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
|
||||
{{ end }}
|
64
values.yaml
64
values.yaml
@ -56,6 +56,67 @@ nfc_monitoring:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 10
|
||||
|
||||
# To add Grafan datasources
|
||||
# Type: list
|
||||
# See: https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources
|
||||
DataSources:
|
||||
- name: alertmanager
|
||||
type: alertmanager
|
||||
access: proxy
|
||||
url: "http://alertmanager-main.{{ .Values.nfc_monitoring.alert_manager.namespace }}.svc:9093"
|
||||
isDefault: false
|
||||
jsonData:
|
||||
tlsSkipVerify: true
|
||||
timeInterval: "5s"
|
||||
implementation: prometheus
|
||||
handleGrafanaManagedAlerts: false
|
||||
orgId: 1
|
||||
editable: true
|
||||
|
||||
- name: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: "http://{{ .Values.nfc_monitoring.loki.service_name }}.{{ .Values.nfc_monitoring.loki.namespace }}.svc.{{ .Values.nfc_monitoring.kubernetes.cluster_dns_name }}:{{ .Values.nfc_monitoring.loki.service_port }}"
|
||||
isDefault: false
|
||||
jsonData:
|
||||
orgId: 1
|
||||
editable: true
|
||||
|
||||
# - name: mimir
|
||||
# type: prometheus
|
||||
# access: proxy
|
||||
# url: "http://mimir-gateway.metrics.svc.cluster.local/prometheus"
|
||||
# isDefault: false
|
||||
# jsonData:
|
||||
# manageAlerts: true
|
||||
# orgId: 1
|
||||
# prometheusType: Mimir
|
||||
# editable: true
|
||||
|
||||
- name: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: "http://prometheus-k8s.{{ .Values.nfc_monitoring.prometheus.namespace }}.svc:9090"
|
||||
isDefault: true
|
||||
jsonData:
|
||||
manageAlerts: true
|
||||
orgId: 1
|
||||
prometheusType: Prometheus
|
||||
prometheusVersion: 2.42.0
|
||||
editable: true
|
||||
|
||||
- name: thanos
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: "http://thanos-query.metrics.svc:9090"
|
||||
isDefault: false
|
||||
jsonData:
|
||||
manageAlerts: true
|
||||
orgId: 1
|
||||
prometheusType: Thanos
|
||||
prometheusVersion: 0.31.0
|
||||
editable: true
|
||||
|
||||
|
||||
grafana_agent:
|
||||
image:
|
||||
@ -138,6 +199,7 @@ nfc_monitoring:
|
||||
|
||||
# List of namespaces that prometheus is to monitor
|
||||
# used to create Roles and RoleBindings
|
||||
# type: list
|
||||
monitor_namespaces:
|
||||
- alerting
|
||||
- default
|
||||
@ -169,6 +231,7 @@ nfc_monitoring:
|
||||
|
||||
# Additional settings for Prometheus.
|
||||
# See: https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PrometheusSpec
|
||||
# Type: dict
|
||||
additional: {}
|
||||
|
||||
# remoteWrite:
|
||||
@ -216,6 +279,7 @@ nfc_monitoring:
|
||||
|
||||
# Prometheus thanos sidecar
|
||||
# see: https://thanos.io/tip/components/sidecar.md/
|
||||
# Type: Dict
|
||||
sidecar:
|
||||
|
||||
enabled: true
|
||||
|
Reference in New Issue
Block a user