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

[release-5.5] Reconcile error on controller when creating LokiStack with tls config

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Hide
      Before this update, the CA key was used as volume name for mounting the CA into the Loki containers caused pods turning in error states when the CA Key included non-conforming characters (e.g. dots). With this update, the volume name is standardized to an internal string which resolves the issue.
      Show
      Before this update, the CA key was used as volume name for mounting the CA into the Loki containers caused pods turning in error states when the CA Key included non-conforming characters (e.g. dots). With this update, the volume name is standardized to an internal string which resolves the issue.
    • Log Storage - Sprint 228

      Description:
      Loki controller throws reconcile error when lokistack is created with tls config.

      LokiStack 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: test
            type: s3
          tls:
            caKey: service-ca.crt
            caName: openshift-service-ca.crt
        storageClassName: gp2-csi
        tenants:
          mode: openshift-logging

      Error:

      "_error": {"msg": "failed to configure lokistack resources", "name": { "Namespace": "openshift-logging", "Name": "lokistack-sample" }

       

      {
          "_ts": "2022-11-29T01:55:21.360821924Z",
          "_level": "0",
          "_component": "loki-operator_controllers_lokistack",
          "_message": "failed to configure resource",
          "_error": {
              "msg": "Deployment.apps \"lokistack-dev-querier\" is invalid: [spec.template.spec.volumes[2].name: Invalid value: \"openshift-service-ca.crt\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'), spec.template.spec.containers[0].volumeMounts[2].name: Not found: \"openshift-service-ca.crt\"]"
          },
          "event": "createOrUpdate",
          "lokistack": {
              "Namespace": "openshift-logging",
              "Name": "lokistack-dev"
          },
          "object_kind": {
              "kind": "Deployment",
              "apiVersion": "apps/v1"
          },
          "object_name": "lokistack-dev-querier"
      }
       
      

      OCP Version: 4.12

      CSV: loki-operator.v5.6.0

      How reproducible: Always

      Expected result: Loki components should be up and running with TLS configuration (Loki v2.7)

      Actual result: error on controller manager

      Controller logs: http://pastebin.test.redhat.com/1083049

            ptsiraki@redhat.com Periklis Tsirakidis
            rhn-support-kbharti Kabir Bharti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: