Uploaded image for project: 'Managed Service - API'
  1. Managed Service - API
  2. MGDAPI-4730

Keycloak Client OSD 4.12 support

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • None
    • None
    • RHOAM Sprint 31

      WHAT
      For now, a tracking Jira more than anything, depends on the outcome of this conversation https://chat.google.com/room/AAAAt6g-c1I/mC1dGCutQ-s

      In order to have keycloak operator compatible with the osd 4.12 keycloak team have decided for their operator to check if unsupported apis are used, and if they are, to remove the unsupported fields and let customer know via logs that a manual fix is required using the supported apis.
      Since this approach will not work with RHOAM as RHOAM has the keycloak client listed as it's dependency and keycloak client uses as it's dependency, we need to remove the dependency between keycloak client and keycloak operator.

      The way to do this is to use the Go's dynamic resources - https://itnext.io/generically-working-with-kubernetes-resources-in-go-53bce678f887
      So that for example, instead of calling keycloak.keycloak (CR) in our code, we would be calling a function to retrieve keycloak CRs dynamically.

      HOW
      Please read the attached document and introduce the removal of dependency between keycloak client and keycloak operator.
      Remove keycloak operator dependency from keycloak client go.mod
      Suggested approach is to have another file that would contain the logic and be generic enough to support other api groups/versions and so on, like in this example:

                	items, err := GetResourcesDynamically(dynamic, ctx, group, version, resource, namespace)
                	if err != nil {
                		return nil, err
                	} 

      TESTS
      unit tests need to be added to the newly created functions
      existing e2e tests should be good enough but a new e2e test that checks the functionality of dynamic resources retrieval is prefferable.

      DONE
      Keycloak operator dependency is removed from keycloak client

              mstoklus_rhmi Michal Stokluska
              mstoklus_rhmi Michal Stokluska
              Jim Fitzpatrick Jim Fitzpatrick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: