@@ -73,6 +73,19 @@ The default configuration values for Prometheus are specified below:
7373 :lines: 3-
7474
7575
76+ Thanos Default Configuration
77+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78+
79+ Thanos provides a global, deduplicated query view over the (highly available)
80+ Prometheus instances.
81+
82+ The default configuration values for Thanos are specified below:
83+
84+ .. literalinclude :: ../../salt/metalk8s/addons/prometheus-operator/config/thanos.yaml
85+ :language: yaml
86+ :lines: 3-
87+
88+
7689Loki Default Configuration
7790~~~~~~~~~~~~~~~~~~~~~~~~~~
7891
@@ -809,6 +822,61 @@ Applying configuration
809822Any changes made to ``metalk8s-prometheus-config `` ConfigMap must then be
810823applied with Salt.
811824
825+ .. parsed-literal ::
826+
827+ root\@ bootstrap $ kubectl exec --kubeconfig /etc/kubernetes/admin.conf \\
828+ -n kube-system -c salt-master salt-master-bootstrap -- \\
829+ salt-run state.sls \\
830+ metalk8s.addons.prometheus-operator.deployed \\
831+ saltenv=metalk8s-|version |
832+
833+ .. _csc-thanos-customization :
834+
835+ Thanos Configuration Customization
836+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
837+
838+ Default configuration for Thanos can be overridden by editing its
839+ Cluster and Service ConfigMap ``metalk8s-thanos-config `` in namespace
840+ ``metalk8s-monitoring `` under the key ``data.config.yaml ``:
841+
842+ .. code-block :: shell
843+
844+ root@bootstrap $ kubectl --kubeconfig /etc/kubernetes/admin.conf \
845+ edit configmap -n metalk8s-monitoring \
846+ metalk8s-thanos-config
847+
848+ Adjust the Thanos Querier resources
849+ """""""""""""""""""""""""""""""""""
850+
851+ The Thanos Querier holds query results in memory, so a heavy query (e.g. the
852+ metrics collection performed by ``sosreport ``) can exceed the default memory
853+ limit and get the Pod ``OOMKilled ``. The CPU and memory requests and limits
854+ can be tuned:
855+
856+ .. code-block :: yaml
857+
858+ ---
859+ apiVersion : v1
860+ kind : ConfigMap
861+ metadata :
862+ name : metalk8s-thanos-config
863+ namespace : metalk8s-monitoring
864+ data :
865+ config.yaml : |-
866+ apiVersion: addons.metalk8s.scality.com
867+ kind: ThanosConfig
868+ spec:
869+ deployment:
870+ resources:
871+ requests:
872+ cpu: "500m"
873+ memory: "512Mi"
874+ limits:
875+ cpu: "1"
876+ memory: "4Gi"
877+
878+ Then apply the configuration:
879+
812880.. parsed-literal ::
813881
814882 root\@ bootstrap $ kubectl exec --kubeconfig /etc/kubernetes/admin.conf \\
0 commit comments