Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-10789

Cannot use jgroups KUBE_PING protocol with label selector in default jboss-dockerfiles docker image

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.5.0.Final, 4.6.0.Final, 4.7.0.Final, 4.8.0.Final, 4.8.1.Final, 4.8.2.Final, 4.8.3.Final, 5.0.0, 6.0.0, 6.0.1
    • Fix Version/s: 7.0.0
    • Component/s: Containers, Distribution
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      When deploying multiple replicas of Keycloak in a Standalone Clustered group, it's necessary to configure a JGroups discovery setup.

      When deploying in Kubernetes, it would be nice to use the KUBE_PING JGroups discovery protocol. One of the properties that the KUBE_PING protocol requires is a labels filter. Kubernetes labels filters are typically specified in a name1=value1,name2=value2 format.

      The default docker image takes the environment variables JGROUPS_DISCOVERY_PROTOCOL and JGROUPS_DISCOVERY_PROPERTIES and uses their contents to configure JGroups. However, when doing so, it munges the Properties, converting = to => and wrapping in { }. (https://github.com/jboss-dockerfiles/keycloak/blob/master/server/tools/jgroups.sh#L8-L9).

      This munging makes it impossible to specify the desired keycloak_jgroups_discovery_protocol_properties, which would be

      {labels=>name1=value1}

      or similar. i.e., one might try to specify JGROUPS_DISCOVERY_PROPERTIES="labels=name1=value1", but this would result in invalid configuration.

      A straightforward fix would be to not do this munging, and update the README to reflect that, but this would be a pretty big break to existing deployments that configured JGROUPS_DISCOVERY_PROPERTIES with key=value,key=value instead of

      {key=>value,key=>value}

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sebastian.laskawiec Sebastian Laskawiec
                Reporter:
                yenthefirst T S
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: