How to configure thanos-sidecar of prometheus -k8s through cluster-monitoring-operator in openshift-monitoring namespace of OKD 4.14

122 Views Asked by At

I manage an Openshift OKD 4.14 cluster.

It comes with a built-in Prometheus CRD: It comes with a built-in Prometheus CRD

This Prometheus CRD spins up a statefulset: enter image description here

I need to configure the thanos-sidecar container and tell it to support an S3 bucket for objectstore (in other words, I want thanos-sidecar to upload metric files to an S3 bucket, specifically Rook-Ceph) enter image description here

I understand that the cluster-monitoring-operator (pod) is responsible for updating the whole stack which includes the Prometheus statefulset. Does someone know the structure and keys how I can configure the thanos-sidecar container via the cluster-monitoring-config ConfigMap?

$ cat cluster-monitoring-config.yaml apiVersion: v1 kind: ConfigMap metadata: name: cluster-monitoring-config namespace: openshift-monitoring data: config.yaml: | enableUserWorkload: true

I tried to find any documentation and I also consulted AI, but I cannot seem to find any documentation (that shows the right structure and keys) for me to be able to configure the thanos-sidecar container of the prometheus-k8s statefulset through the "cluster-monitoring-operator" in openshift-monitoring namespace for Openshift OKD 4.14.

Please help or shed some advice.

I tried to directly update the thanos-sidecar part inside the built-in Prometheus CRD, but Openshift OKD is reverting the configuration back to the original settings automatically (probably this is done by the "cluster-monitoring-operator" pod in openshift-monitoring namespace).

0

There are 0 best solutions below