Uploaded image for project: 'OpenShift Monitoring'
  1. OpenShift Monitoring
  2. MON-2216

Expose retention size settings for Platform Prometheus in the CMO configuration

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • Sprint 217

      We should introduce a new "retentionSize" field under the prometheusK8s key. To keep things backward compatible, the existing "retention" field applies to time retention only.

      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
          prometheusK8s:
            retention: 1y
            retentionSize: 10GiB

       

      If the retention value is "", "0" or "0GB" (or any other variant), it means that the value isn't defined (the same as with Prometheus).

      The operator should consider the following cases:

      • When neither retention nor retentionSize are defined, a default of 15d for time retention applies.
      • When "retentionSize" is defined and "retention" isn't, only size retention applies.
      • When "retentionSize" isn't defined and "retention" is, only time retention applies
      • When both time and size retention fields are defined, both apply. If any of them is true at some point in time (either blocks are too old or the size of all blocks exceeds the size limit) then data is purged.

      automatic tuning of size retention based on persistent storage capacity will come later with MON-2218.

      DoD

      • User can configure size-based retention in the CMO configuration which is applied to the Platform Prometheus.

              janantha@redhat.com Jayapriya Pai
              spasquie@redhat.com Simon Pasquier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: