Implement tolerations when deployin Keycloak using Operator

108 views
Skip to first unread message

davidh

unread,
Sep 23, 2021, 5:18:17 AM9/23/21
to Keycloak Dev
Hi,

I need to deploy Keycloak in an on-premise kubernetes using the Keycloak Operator. However, my nodes in the cluster require tolerations on any Deploymentsor Statefulset.

I saw that the issue KEYCLOAK-18547 has been opened that corresponds to my needs with no comments or PR yet.

I have experience with Kubernetes operators using Operator SDK so I would like to discuss with the community to try to implement this feature.

By looking at the operator's source code, I already noticed that in keycloak_types.go we could add tolerations in the type DeploymentSpec. Then we can add in the Keycloak deployment's model the tolerations in the statefulset based on the spec. We can do so for the Postgres database as well but didn't check it out yet since I am using an external database. 

Note: I am not sure with the dev mail list is the place to discuss code implementation

I am looking forward to this discussion and hope we can achieve the implementation of this feature rapidly.

Václav Muzikář

unread,
Sep 24, 2021, 7:08:01 AM9/24/21
to davidh, Keycloak Dev
Hello,
thanks for reaching out. Yes, this is the correct ML to discuss implementation. It makes sense to add this. However, only to the Keycloak/RH-SSO StatefulSet, not to the embedded DB as we plan to remove it in the future in any case [1].

A contribution would be much appreciated! :)


--
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/dea50621-6182-4053-b485-21dc6cacbeb4n%40googlegroups.com.


--
Václav Muzikář
Senior Software Engineer
Keycloak / Red Hat Single Sign-On
Red Hat Czech s.r.o.

davidh

unread,
Sep 24, 2021, 10:31:11 AM9/24/21
to Keycloak Dev
Hello,

Alright I agree on the fact to add the feature only on the Keycloak/RH-SSO StatefulSet. I am planning to start working on the feature in the next days.

Sebastian Łaskawiec

unread,
Sep 26, 2021, 4:00:30 PM9/26/21
to davidh, Keycloak Dev
Keep in mind that you can use a Mutating Webhook to add whatever is needed into Keycloak or Postgresql StatefulSet/Deployment.



--
Sebastian Łaskawiec

davidh

unread,
Sep 27, 2021, 1:33:58 PM9/27/21
to Keycloak Dev
I didn't know we can use mutation webhook in this case, but I think it's like using a sledgehammer to crack a peanut.
Message has been deleted

davidh

unread,
Nov 16, 2021, 11:30:40 AM11/16/21
to Keycloak Dev
Pull request done but need reviewers to launch the CI/CD workflows: https://github.com/keycloak/keycloak-operator/pull/401
Reply all
Reply to author
Forward
0 new messages