Hello,
I've opened this issue because we would like to use the operator with an external keycloak instance and I think other people could have this use case as well.Is this an addition you guys would want and what would be necessary to get it in the operator? I'm willing to submit a PR for this issue.Greetings,Jochen Niebuhr.--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/56464f56-0d77-458d-ab4b-82d99a0d63b4n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/18b43154-5621-429a-8e4a-484fe01c5191n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/b569a12a-3fca-4ed9-a24c-672d26c78620n%40googlegroups.com.
Yeah. KeycloakClient at minimum would be very very useful. User might be useful. Realm might be useful.
API wise though, just setting some kind of external flag and url in the Keycloak CR would then let KeycloakClient/Realm/etc to work unmodified. The deployment part of the operator could just ignore it and just the part running the Keycloak admin api would still do its thing.
Thanks,
Kevin
________________________________________
From: keyclo...@googlegroups.com <keyclo...@googlegroups.com> on behalf of Stian Thorgersen <stho...@redhat.com>
Sent: Monday, September 14, 2020 3:42 AM
To: Jochen Niebuhr
Cc: Keycloak Dev
Subject: Re: [keycloak-dev] KEYCLOAK-15476: Support external Keycloak in Operator
I can see the need for an Operator in one cluster to be able to register/manage clients in a different cluster (or even not deployed to K8s at all).
"Support external Keycloak in Operator" is definitively to broad a scope, but perhaps this would actually make sense, and we could at least initially limit it to only KeycloakCLient CRD.
On Mon, 14 Sep 2020 at 12:12, 'Jochen Niebuhr' via Keycloak Dev <keyclo...@googlegroups.com<mailto:keyclo...@googlegroups.com>> wrote:
In our case the Keycloak instance is on another Kubernetes cluster and also deployed with the operator. But to create clients from the application cluster the operator would need this to reference the Keycloak instance.
sebastian...@gmail.com<mailto:sebastian...@gmail.com> schrieb am Montag, 14. September 2020 um 12:09:37 UTC+2:
Thanks for the proposal.
I'm not in favor of this. Keycloak Operator is an opinionated way for deploying and managing Keycloaks in your Kubernetes/OpenShift cluster. Managing a cluster that has been deployed manually is something that goes in an opposite direction.
On Mon, 14 Sep 2020 at 11:58, 'Jochen Niebuhr' via Keycloak Dev <keyclo...@googlegroups.com> wrote:
Hello,
I've opened this issue because we would like to use the operator with an external keycloak instance and I think other people could have this use case as well.
Is this an addition you guys would want and what would be necessary to get it in the operator? I'm willing to submit a PR for this issue.
Greetings,
Jochen Niebuhr.
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/56464f56-0d77-458d-ab4b-82d99a0d63b4n%40googlegroups.com<https://groups.google.com/d/msgid/keycloak-dev/56464f56-0d77-458d-ab4b-82d99a0d63b4n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Sebastian Łaskawiec
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com<mailto:keycloak-dev...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/18b43154-5621-429a-8e4a-484fe01c5191n%40googlegroups.com<https://groups.google.com/d/msgid/keycloak-dev/18b43154-5621-429a-8e4a-484fe01c5191n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com<mailto:keycloak-dev...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAcRpWYcsLf047ZuXKpkNgLv%2B_Q2n%3D1P3vc1NbEJ_jLZNg%40mail.gmail.com<https://groups.google.com/d/msgid/keycloak-dev/CAJgngAcRpWYcsLf047ZuXKpkNgLv%2B_Q2n%3D1P3vc1NbEJ_jLZNg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAf%2BLBiQbzPm4y-E11NP3Xyz0k55GwMovS%2Bhr7a%2B55n9_Q%40mail.gmail.com.
Am 15.09.2020 um 13:24 schrieb Sebastian Łaskawiec <sebastian...@gmail.com>:
I wonder if creating Clients is the only use case here? What about creating Users, Realms?
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/9286eff4-f99f-4f48-9a53-fc0ed7a9ba1fn%40googlegroups.com.
Variant A is the one I've suggested in my issue. In that one I've created an ExternalKeycloak and ExternalKeycloakRealm CR to be targeted by the instanceSelector and realmSelector fields, much like you can define an ExternalName service in K8S. I created interfaces to be used by the controller code that's implemented by Keycloak and ExternalKeycloak (for KeycloakReference) and KeycloakRealm and ExternalKeycloakRealm (for KeycloakRealmReference). Then it was just a matter of switching the references to the CR to the interfaces and adjusting the GetMatchingRealms and GetMatchingKeycloaks functions.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/31e35b21-2896-40b8-8057-0412c97e0bcen%40googlegroups.com.
On Wed, 16 Sep 2020, 10:08 'Jochen Niebuhr' via Keycloak Dev, <keyclo...@googlegroups.com> wrote:Variant A is the one I've suggested in my issue. In that one I've created an ExternalKeycloak and ExternalKeycloakRealm CR to be targeted by the instanceSelector and realmSelector fields, much like you can define an ExternalName service in K8S. I created interfaces to be used by the controller code that's implemented by Keycloak and ExternalKeycloak (for KeycloakReference) and KeycloakRealm and ExternalKeycloakRealm (for KeycloakRealmReference). Then it was just a matter of switching the references to the CR to the interfaces and adjusting the GetMatchingRealms and GetMatchingKeycloaks functions.This approach makes sense to me, but is there really a need to have ExternalKeycloak? Only ExternalKeycloakRealm makes more sense to me.
Variant B was suggested in here. For now I've added just an external Flag to Keycloak and KeycloakRealm which means they will not be managed but can be referenced by other resources. For the Keycloak CR this also means adding the Endpoint and CredentialSecret fields from the status into the spec. The only thing that needed to be done in the controller code was checking the external flag before reconciling any resource and adjusting rest client creation to switch between the different endpoint fields. There were already suggestions in the PR to move the external flag to "external.enabled" or use an enum, so that could be done as well.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAeFV%2B7XtpQr_Nrcby6d6DjWwE78iVkGKkip%2BgXz9re8oA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/fa24d159-f1ea-4995-ad71-091652df6a55n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CADP5VTXS6rFq1d%2B8iy2w7Yiu-pcZSK6xwdRy8NJfRdGYP55mzQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/41933c61-0966-4cf3-9a86-819364f78f81n%40googlegroups.com.
+1 to client only.
I'd recommend making a "unmanaged" field of KeycloakRealm and must be set to true if Keycloak CR is external, and if false or missing, throw an error.
This would allow the option for a managed one to be added later without breaking any existing systems if desired. It also could allow which default, true or false to be decided later without breaking existing deployments.
Thanks,
Kevin
________________________________________
From: keyclo...@googlegroups.com <keyclo...@googlegroups.com> on behalf of Stian Thorgersen <stho...@redhat.com>
Sent: Thursday, September 17, 2020 1:03 AM
To: Sebastian Łaskawiec
Cc: Jochen Niebuhr; Keycloak Dev
Subject: Re: [keycloak-dev] KEYCLOAK-15476: Support external Keycloak in Operator
I don't think we should support creating realms in an external KC instance, only clients at this point.
On Thu, 17 Sep 2020 at 09:28, Sebastian Łaskawiec <sebastian...@gmail.com<mailto:sebastian...@gmail.com>> wrote:
Honestly, I think spec.external is a better name. So the question is what we will need there. I can see:
- spec.external.enabled
- spec.external.externalURL
There's probably no need to specify credential secret here because the Operator figures it out from the CR name. Later on, we can introduce a feature that will enable you to override this behaviour (but there's no need for this right now).
On Wed, 16 Sep 2020 at 14:54, 'Jochen Niebuhr' via Keycloak Dev <keyclo...@googlegroups.com<mailto:keyclo...@googlegroups.com>> wrote:
I wanted to keep the possibility in both PRs to also create realms for those keycloaks, that's why I had the two separate CRs in Variant A.
If we want to use the "managementState" field, we could have a separate field called "access" containing "endpoint" and "credentialsSecret" fields which is required when "managementState" is "Unmanaged".
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAf%2BLBiQbzPm4y-E11NP3Xyz0k55GwMovS%2Bhr7a%2B55n9_Q%40mail.gmail.com<https://groups.google.com/d/msgid/keycloak-dev/CAJgngAf%2BLBiQbzPm4y-E11NP3Xyz0k55GwMovS%2Bhr7a%2B55n9_Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
Sebastian Łaskawiec
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/9286eff4-f99f-4f48-9a53-fc0ed7a9ba1fn%40googlegroups.com<https://groups.google.com/d/msgid/keycloak-dev/9286eff4-f99f-4f48-9a53-fc0ed7a9ba1fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/31e35b21-2896-40b8-8057-0412c97e0bcen%40googlegroups.com<https://groups.google.com/d/msgid/keycloak-dev/31e35b21-2896-40b8-8057-0412c97e0bcen%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAeFV%2B7XtpQr_Nrcby6d6DjWwE78iVkGKkip%2BgXz9re8oA%40mail.gmail.com<https://groups.google.com/d/msgid/keycloak-dev/CAJgngAeFV%2B7XtpQr_Nrcby6d6DjWwE78iVkGKkip%2BgXz9re8oA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
Sebastian Łaskawiec
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com<mailto:keycloak-dev...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/fa24d159-f1ea-4995-ad71-091652df6a55n%40googlegroups.com<https://groups.google.com/d/msgid/keycloak-dev/fa24d159-f1ea-4995-ad71-091652df6a55n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Sebastian Łaskawiec
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com<mailto:keycloak-dev...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CADP5VTXS6rFq1d%2B8iy2w7Yiu-pcZSK6xwdRy8NJfRdGYP55mzQ%40mail.gmail.com<https://groups.google.com/d/msgid/keycloak-dev/CADP5VTXS6rFq1d%2B8iy2w7Yiu-pcZSK6xwdRy8NJfRdGYP55mzQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com<mailto:keycloak-dev...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAJgngAc-HOTwJv8A7Ct9EZCPQd_-KvPFQhYg%2BZgRkfNj0X-bPg%40mail.gmail.com<https://groups.google.com/d/msgid/keycloak-dev/CAJgngAc-HOTwJv8A7Ct9EZCPQd_-KvPFQhYg%2BZgRkfNj0X-bPg%40mail.gmail.com?utm_medium=email&utm_source=footer>.