Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-2878

The default schema version should be v12

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Undefined
    • None
    • Logging 5.5.0
    • Log Storage, Loki
    • None
    • False
    • None
    • False
    • NEW
    • OBSDA-7 - Adopting Loki as an alternative to Elasticsearch to support more lightweight, easier to manage/operate storage scenarios
    • NEW

    Description

      The New Lokistack starts with V11 by default. A per https://issues.redhat.com/browse/LOG-2479, the default version should be v12

      Steps to reproduce the issue:
      1) deploy loki-operator 5.5.
      2) deploy lokistack

      cat <<EOF |oc create -f -
      apiVersion: loki.grafana.com/v1
      kind: LokiStack
      metadata:
        name: lokistack-sample
        namespace: openshift-logging
      spec:
        size: 1x.extra-small
        storage:
          secret:
            name: s3-secret
            type: s3
        storageClassName: gp2
        tenants:
          mode: openshift-logging
        rules:
          enabled: true
          selector:
            matchLabels:
              openshift.io/cluster-monitoring: "true"
          namespaceSelector:
            matchLabels:
              openshift.io/cluster-monitoring: "true"
      EOF
      
      

      2) check the lokistack

       oc get lokistack lokistack-sample -o json |jq '.spec'
      {
        "managementState": "Managed",
        "replicationFactor": 1,
        "rules": {
          "enabled": true,
          "namespaceSelector": {
            "matchLabels": {
              "openshift.io/cluster-monitoring": "true"
            }
          },
          "selector": {
            "matchLabels": {
              "openshift.io/cluster-monitoring": "true"
            }
          }
        },
        "size": "1x.extra-small",
        "storage": {
          "schemas": [
            {
              "effectiveDate": "2020-10-11",
              "version": "v11"
            }
          ],
          "secret": {
            "name": "s3-secret",
            "type": "s3"
          }
        },
        "storageClassName": "gp2",
        "tenants": {
          "mode": "openshift-logging"
        }
      }
      
      

      Expected result:
      schema version is v12

      Workaround:
      You can specify the schema version in CR.

      apiVersion: loki.grafana.com/v1
      kind: LokiStack
      metadata:
        name: lokistack-dev
        namespace: openshift-logging
      spec:
        size: 1x.extra-small
        storage:
          schemas:
         - version: v12
            effectiveDate: 2022-06-01
          secret:
            name: s3-secret
            type: s3
        storageClassName: gp2
        tenants:
          mode: openshift-logging
        rules:
          enabled: true
          selector:
            matchLabels:
              openshift.io/cluster-monitoring: "true"
          namespaceSelector:
            matchLabels:
              openshift.io/cluster-monitoring: "true"
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-anli Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: