Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      The KeyCloak CR contains a Status field for a KeycloakStatus struct. Within this KeycloakStatus struct, there is a version field that should give the version of insalled KeyCloak / RHSSO :
      https://github.com/keycloak/keycloak-operator/blob/979290a0193a19a907d7197a4032c5dead5eb85b/pkg/apis/keycloak/v1alpha1/keycloak_types.go#L86

      Looking through the Keycloak operator code, this version field is never set and so reports an empty string in the Keycloak CR.

      status:
        credentialSecret: credential-rhssouser
        internalURL: 'https://keycloak-redhat-rhmi-user-sso.apps.chfan.u1a3.s1.devshift.org'
        message: ''
        phase: initialising
        ready: false
        secondaryResources:
          ServiceMonitor:
            - keycloak-service-monitor
          PrometheusRule:
            - keycloak
          Route:
            - keycloak
          GrafanaDashboard:
            - keycloak
          Secret:
            - keycloak-db-secret
            - credential-rhssouser
          Service:
            - keycloak-postgresql
            - keycloak
            - keycloak-discovery
          PodMonitor:
            - keycloak-pod-monitor
          StatefulSet:
            - keycloak
          ConfigMap:
            - keycloak-probes
        version: ''
      

      This should likely be set in the keycloak_controller ManageSuccess() function where other fields of the status is also set:
      https://github.com/keycloak/keycloak-operator/blob/979290a0193a19a907d7197a4032c5dead5eb85b/pkg/controller/keycloak/keycloak_controller.go#L252

      However, as the operator can install a version of keycloak or RHSSO, this version should be set to whichever path the operator is using.
      This can prove a bit more difficult as the version of the RHSSO is not entirely apparent from the image version:
      https://github.com/keycloak/keycloak-operator/blob/979290a0193a19a907d7197a4032c5dead5eb85b/pkg/model/constants.go#L17

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sebastian.laskawiec Sebastian Laskawiec
                Reporter:
                chfan Kevin Chi Keen Fan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: