global: thanos: enabled: true # For Thanos Installs, Allow Higher Concurrency from Cost-Model # Still may require tweaking for some installs, but the thanos-query-frontend # will greatly assist in reduction memory bloat in query. kubecostModel: maxQueryConcurrency: 5 # This configuration is applied to thanos only. Expresses the resolution to # use for longer query ranges. Options: raw, 5m, 1h - Default: raw maxSourceResolution: 5m prometheus: server: extraArgs: storage.tsdb.min-block-duration: 2h storage.tsdb.max-block-duration: 2h storage.tsdb.retention: 2w extraVolumes: - name: object-store-volume secret: # Ensure this secret name matches thanos.storeSecretName secretName: kubecost-thanos enableAdminApi: true sidecarContainers: - name: thanos-sidecar image: thanosio/thanos:v0.15.0 args: - sidecar - --log.level=debug - --tsdb.path=/data/ - --prometheus.url=http://127.0.0.1:9090 - --objstore.config-file=/etc/config/object-store.yaml # Start of time range limit to serve. Thanos sidecar will serve only metrics, which happened # later than this value. Option can be a constant time in RFC3339 format or time duration # relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --min-time=-3h env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name ports: - name: sidecar-http containerPort: 10902 - name: grpc containerPort: 10901 - name: cluster containerPort: 10900 volumeMounts: - name: config-volume mountPath: /etc/prometheus - name: storage-volume mountPath: /data subPath: "" - name: object-store-volume mountPath: /etc/config thanos: store: enabled: true grpcSeriesMaxConcurrency: 20 blockSyncConcurrency: 20 extraEnv: - name: GOGC value: "100" resources: requests: memory: "2.5Gi" query: enabled: true timeout: 3m # Maximum number of queries processed concurrently by query node. maxConcurrent: 8 # Maximum number of select requests made concurrently per a query. maxConcurrentSelect: 2 resources: requests: memory: "2.5Gi" autoDownsampling: false extraEnv: - name: GOGC value: "100" # Thanos Query Frontend queryFrontend: enabled: true compressResponses: true # Response Cache Configuration # Configure either a max size constraint or max items. responseCache: enabled: true # Maximum memory size of the cache in bytes. A unit suffix (KB, MB, GB) may be applied. maxSize: 1.25GB # Maximum number of entries in the cache. maxSizeItems: 0 # The expiry duration for the cache. validity: 2m resources: requests: memory: "1.5Gi" # Thanos Sidecar Service Discovery sidecar: enabled: true bucket: enabled: false compact: enabled: true dataVolume: persistentVolumeClaim: claimName: compact-data-volume storage: 100Gi # This secret name should match the sidecar configured secret name volume # in the prometheus.server.extraVolumes entry storeSecretName: kubecost-thanos