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

Manage multiple keycloak instances with one operator

    XMLWordPrintable

    Details

      Description

      I believe the quick solution to this is to deploy a separate keycloak-operator into different namespaces, but I'd like to have one operator manage multiple CRDs. I might have even gotten this idea from docs, somewhere, some time ago, but couldn't find them this time around.

      I looked at the code and `pkg/models/constants.go` seems to have basically hard-coded names for everything. I tried to add some basic "release name" support (a la Helm), and realized it wasn't necessarily as straightforward as prefixing all the constants with the name of the CRD. Maybe one operator per instance made sense for some other reason, I thought, so I'm opening a ticket.

      My basic approach was to do something like `Prefix(cr, KeycloakDeploymentName)`, or `cr.GetDeploymentName()` in most places consts are being used, as well as adding `"app.kubernetes.io/instance": cr.(ObjectMeta?).Name` to labels/selectors. Any thoughts or guidance on this?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              cmattoondl Curtis Mattoon (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: