2024-02-27 12:05:24 -06:00
|
|
|
---
|
|
|
|
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
|
2024-05-28 10:02:09 -05:00
|
|
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
2024-02-27 12:05:24 -06:00
|
|
|
kind: HelmRelease
|
|
|
|
metadata:
|
|
|
|
name: thanos
|
|
|
|
spec:
|
|
|
|
interval: 30m
|
|
|
|
timeout: 15m
|
|
|
|
chart:
|
|
|
|
spec:
|
|
|
|
chart: thanos
|
2024-05-30 06:07:28 -05:00
|
|
|
version: 1.17.2
|
2024-02-27 12:05:24 -06:00
|
|
|
sourceRef:
|
|
|
|
kind: HelmRepository
|
2024-04-04 10:47:54 -05:00
|
|
|
name: stevehipwell
|
2024-02-27 12:05:24 -06:00
|
|
|
namespace: flux-system
|
|
|
|
install:
|
|
|
|
remediation:
|
|
|
|
retries: 3
|
|
|
|
upgrade:
|
|
|
|
cleanupOnFail: true
|
|
|
|
remediation:
|
2024-04-04 10:47:54 -05:00
|
|
|
strategy: rollback
|
2024-02-27 12:05:24 -06:00
|
|
|
retries: 3
|
2024-04-04 10:47:54 -05:00
|
|
|
valuesFrom:
|
|
|
|
- targetPath: objstoreConfig.value.config.bucket
|
2024-05-08 18:37:29 -05:00
|
|
|
kind: Secret
|
|
|
|
name: thanos-secret
|
|
|
|
valuesKey: S3_BUCKET
|
2024-04-04 10:47:54 -05:00
|
|
|
- targetPath: objstoreConfig.value.config.endpoint
|
2024-05-08 18:37:29 -05:00
|
|
|
kind: Secret
|
|
|
|
name: thanos-secret
|
|
|
|
valuesKey: S3_HOST
|
2024-04-04 10:47:54 -05:00
|
|
|
- targetPath: objstoreConfig.value.config.region
|
2024-05-08 18:37:29 -05:00
|
|
|
kind: Secret
|
|
|
|
name: thanos-secret
|
|
|
|
valuesKey: S3_REGION
|
2024-04-04 10:47:54 -05:00
|
|
|
- targetPath: objstoreConfig.value.config.access_key
|
|
|
|
kind: Secret
|
2024-05-08 18:37:29 -05:00
|
|
|
name: thanos-secret
|
|
|
|
valuesKey: S3_ACCESS_KEY
|
2024-04-04 10:47:54 -05:00
|
|
|
- targetPath: objstoreConfig.value.config.secret_key
|
|
|
|
kind: Secret
|
2024-05-08 18:37:29 -05:00
|
|
|
name: thanos-secret
|
|
|
|
valuesKey: S3_SECRET_KEY
|
2024-02-27 12:05:24 -06:00
|
|
|
values:
|
|
|
|
objstoreConfig:
|
2024-04-04 10:47:54 -05:00
|
|
|
value:
|
|
|
|
type: s3
|
2024-02-27 12:05:24 -06:00
|
|
|
config:
|
2024-05-08 18:37:29 -05:00
|
|
|
insecure: false
|
2024-04-04 10:47:54 -05:00
|
|
|
additionalEndpoints:
|
|
|
|
- dnssrv+_grpc._tcp.kube-prometheus-stack-thanos-discovery.observability.svc.cluster.local
|
|
|
|
additionalReplicaLabels: ["__replica__"]
|
|
|
|
serviceMonitor:
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-04-04 10:47:54 -05:00
|
|
|
compact:
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-04-04 10:47:54 -05:00
|
|
|
extraArgs:
|
2024-02-27 12:05:24 -06:00
|
|
|
- --compact.concurrency=4
|
|
|
|
- --delete-delay=30m
|
2024-04-04 10:47:54 -05:00
|
|
|
- --retention.resolution-raw=14d
|
|
|
|
- --retention.resolution-5m=30d
|
|
|
|
- --retention.resolution-1h=60d
|
|
|
|
persistence: &persistence
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-07-08 11:20:49 -05:00
|
|
|
storageClass: openebs-hostpath
|
2024-02-27 12:05:24 -06:00
|
|
|
size: 10Gi
|
2024-04-08 12:11:55 -05:00
|
|
|
query:
|
2024-05-07 13:31:53 -05:00
|
|
|
replicas: 1
|
2024-04-08 12:11:55 -05:00
|
|
|
extraArgs: ["--alert.query-url=https://thanos.jahanson.tech"]
|
2024-04-04 10:47:54 -05:00
|
|
|
queryFrontend:
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-05-07 13:31:53 -05:00
|
|
|
replicas: 1
|
2024-04-04 10:47:54 -05:00
|
|
|
extraEnv: &extraEnv
|
|
|
|
- name: THANOS_CACHE_CONFIG
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: &configMap thanos-cache-configmap
|
|
|
|
key: cache.yaml
|
|
|
|
extraArgs: ["--query-range.response-cache-config=$(THANOS_CACHE_CONFIG)"]
|
|
|
|
ingress:
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-04-07 09:52:32 -05:00
|
|
|
ingressClassName: internal-nginx
|
2024-04-04 10:47:54 -05:00
|
|
|
hosts:
|
2024-04-07 11:06:58 -05:00
|
|
|
- &host thanos.jahanson.tech
|
2024-04-04 10:47:54 -05:00
|
|
|
tls:
|
|
|
|
- hosts: [*host]
|
|
|
|
podAnnotations: &podAnnotations
|
|
|
|
configmap.reloader.stakater.com/reload: *configMap
|
|
|
|
rule:
|
2024-02-27 12:05:24 -06:00
|
|
|
enabled: true
|
2024-05-07 13:31:53 -05:00
|
|
|
replicas: 1
|
2024-04-04 10:47:54 -05:00
|
|
|
extraArgs: ["--web.prefix-header=X-Forwarded-Prefix"]
|
|
|
|
alertmanagersConfig:
|
|
|
|
value: |-
|
|
|
|
alertmanagers:
|
|
|
|
- api_version: v2
|
|
|
|
static_configs:
|
|
|
|
- dnssrv+_http-web._tcp.alertmanager-operated.observability.svc.cluster.local
|
|
|
|
rules:
|
|
|
|
value: |-
|
|
|
|
groups:
|
|
|
|
- name: PrometheusWatcher
|
|
|
|
rules:
|
|
|
|
- alert: PrometheusDown
|
|
|
|
annotations:
|
|
|
|
summary: A Prometheus has disappeared from Prometheus target discovery
|
|
|
|
expr: absent(up{job="kube-prometheus-stack-prometheus"})
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
persistence: *persistence
|
|
|
|
storeGateway:
|
2024-05-07 13:31:53 -05:00
|
|
|
replicas: 1
|
2024-04-04 10:47:54 -05:00
|
|
|
extraEnv: *extraEnv
|
|
|
|
extraArgs: ["--index-cache.config=$(THANOS_CACHE_CONFIG)"]
|
|
|
|
persistence: *persistence
|
2024-05-07 13:31:53 -05:00
|
|
|
podAnnotations: *podAnnotations
|