@ -77,7 +77,9 @@ This helm chart started off with components from multiple open-source projects.
|
|||||||
|
|
||||||
- Promtail
|
- Promtail
|
||||||
|
|
||||||
- Prometheus as the metrics collector
|
- Prometheus
|
||||||
|
|
||||||
|
- Thanos sidecar _Optional_
|
||||||
|
|
||||||
- Service monitors
|
- Service monitors
|
||||||
|
|
||||||
|
@ -51,4 +51,11 @@ spec:
|
|||||||
serviceMonitorSelector: {}
|
serviceMonitorSelector: {}
|
||||||
storage:
|
storage:
|
||||||
{{- toYaml .Values.nfc_monitoring.prometheus.affinity | nindent 4 }}
|
{{- toYaml .Values.nfc_monitoring.prometheus.affinity | nindent 4 }}
|
||||||
|
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
|
||||||
|
thanos:
|
||||||
|
image: "{{ .Values.nfc_monitoring.thanos.image.name }}:{{ .Values.nfc_monitoring.thanos.image.tag }}"
|
||||||
|
objectStorageConfig:
|
||||||
|
key: thanos.yaml
|
||||||
|
name: thanos-sidecar-config
|
||||||
|
{{ end }}
|
||||||
version: 2.42.0
|
version: 2.42.0
|
||||||
|
13
templates/Secret-prometheus-sidecar-thanos.yaml
Normal file
13
templates/Secret-prometheus-sidecar-thanos.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: thanos-sidecar-config
|
||||||
|
namespace: monitoring
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
thanos.yaml: |-
|
||||||
|
{{ toYaml .Values.nfc_monitoring.thanos.sidecar.config | nindent 4 }}
|
||||||
|
|
||||||
|
{{ end }}
|
@ -25,3 +25,35 @@ spec:
|
|||||||
app.kubernetes.io/name: prometheus
|
app.kubernetes.io/name: prometheus
|
||||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
sessionAffinity: ClientIP
|
sessionAffinity: ClientIP
|
||||||
|
|
||||||
|
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: prometheus-sidecar
|
||||||
|
app.kubernetes.io/instance: k8s
|
||||||
|
app.kubernetes.io/name: thanos-sidecar
|
||||||
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
|
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||||
|
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||||
|
name: thanos-sidecar
|
||||||
|
namespace: {{ .Values.nfc_monitoring.prometheus.namespace }}
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: grpc
|
||||||
|
port: 10901
|
||||||
|
targetPort: 10901
|
||||||
|
- name: http
|
||||||
|
port: 10902
|
||||||
|
targetPort: 10902
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: prometheus
|
||||||
|
app.kubernetes.io/instance: k8s
|
||||||
|
app.kubernetes.io/name: prometheus
|
||||||
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
@ -29,3 +29,34 @@ spec:
|
|||||||
app.kubernetes.io/instance: k8s
|
app.kubernetes.io/instance: k8s
|
||||||
app.kubernetes.io/name: prometheus
|
app.kubernetes.io/name: prometheus
|
||||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
|
|
||||||
|
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: prometheus-sidecar
|
||||||
|
app.kubernetes.io/instance: thanos-sidecar
|
||||||
|
app.kubernetes.io/name: thanos-sidecar
|
||||||
|
app.kubernetes.io/version: v0.30.2
|
||||||
|
name: thanos-sidecar
|
||||||
|
namespace: {{ .Values.nfc_monitoring.prometheus.namespace }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- port: http
|
||||||
|
relabelings:
|
||||||
|
- action: replace
|
||||||
|
separator: /
|
||||||
|
sourceLabels:
|
||||||
|
- namespace
|
||||||
|
- pod
|
||||||
|
targetLabel: instance
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: prometheus-sidecar
|
||||||
|
app.kubernetes.io/instance: k8s
|
||||||
|
app.kubernetes.io/name: thanos-sidecar
|
||||||
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
|
|
||||||
|
{{ end }}
|
21
values.yaml
21
values.yaml
@ -66,7 +66,7 @@ nfc_monitoring:
|
|||||||
|
|
||||||
loki:
|
loki:
|
||||||
|
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
image:
|
image:
|
||||||
name: grafana/loki
|
name: grafana/loki
|
||||||
@ -201,6 +201,25 @@ nfc_monitoring:
|
|||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
weight: 10
|
weight: 10
|
||||||
|
|
||||||
|
thanos:
|
||||||
|
image:
|
||||||
|
name: thanosio/thanos
|
||||||
|
tag: v0.32.3
|
||||||
|
|
||||||
|
# Prometheus thanos sidecar
|
||||||
|
# see: https://thanos.io/tip/components/sidecar.md/
|
||||||
|
sidecar:
|
||||||
|
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
config:
|
||||||
|
type: S3
|
||||||
|
config:
|
||||||
|
bucket: "thanos-metrics"
|
||||||
|
endpoint: "rook-ceph-rgw-earth.ceph.svc:80"
|
||||||
|
access_key: "7J5NM2MNCDB4T4Y9OKJ5"
|
||||||
|
secret_key: "t9r69RzZdWEBL3NCKiUIpDk6j5625xc6HucusiGG"
|
||||||
|
|
||||||
|
|
||||||
additions:
|
additions:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user