feat(thanos_sidecar): if enabled must also be configured for deploy to occur

!8
This commit is contained in:
2024-02-04 15:04:24 +09:30
parent 18649086b5
commit cd2bceec3a
5 changed files with 21 additions and 11 deletions

View File

@ -48,12 +48,14 @@ spec:
storage:
{{- toYaml .Values.nfc_monitoring.prometheus.storage | nindent 4 }}
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
{{ if .Values.nfc_monitoring.thanos.sidecar.config }}
thanos:
image: "{{ .Values.nfc_monitoring.thanos.image.name }}:{{ .Values.nfc_monitoring.thanos.image.tag }}"
objectStorageConfig:
key: thanos.yaml
name: thanos-sidecar-config
{{ end }}
{{ end }}
version: 2.42.0
{{ if .Values.nfc_monitoring.prometheus.additional }}
{{ toYaml .Values.nfc_monitoring.prometheus.additional | nindent 2 }}

View File

@ -1,4 +1,5 @@
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
{{ if .Values.nfc_monitoring.thanos.sidecar.config }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
@ -53,3 +54,4 @@ spec:
severity: critical
{{ end }}
{{ end }}

View File

@ -1,4 +1,5 @@
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
{{ if .Values.nfc_monitoring.thanos.sidecar.config }}
---
apiVersion: v1
kind: Secret
@ -16,3 +17,4 @@ stringData:
{{ toYaml .Values.nfc_monitoring.thanos.sidecar.config | nindent 4 }}
{{ end }}
{{ end }}

View File

@ -28,6 +28,8 @@ spec:
app.kubernetes.io/part-of: {{ $.Chart.Name }}
{{ if .Values.nfc_monitoring.thanos.sidecar.enabled }}
{{ if .Values.nfc_monitoring.thanos.sidecar.config }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
@ -57,3 +59,4 @@ spec:
app.kubernetes.io/part-of: {{ $.Chart.Name }}
{{ end }}
{{ end }}

View File

@ -410,14 +410,15 @@ nfc_monitoring:
enabled: true
config:
type: S3
config:
bucket: "thanos-metrics"
endpoint: "rook-ceph-rgw-earth.ceph.svc:80"
access_key: "7J5NM2MNCDB4T4Y9OKJ5"
secret_key: "t9r69RzZdWEBL3NCKiUIpDk6j5625xc6HucusiGG"
insecure: true
# Config must be specified for the sidecar to deploy
config: {}
# type: S3
# config:
# bucket: "thanos-metrics"
# endpoint: "rook-ceph-rgw-earth.ceph.svc:80"
# access_key: "7J5NM2MNCDB4T4Y9OKJ5"
# secret_key: "t9r69RzZdWEBL3NCKiUIpDk6j5625xc6HucusiGG"
# insecure: true
additions: