Handling configs in multitenancy

142 views
Skip to first unread message

Brand Bintley

unread,
Jul 26, 2021, 7:55:28 PM7/26/21
to Quarkus Development mailing list
I have an app that uses schema based multi tenancy as described here: https://quarkus.io/guides/hibernate-orm#multitenancy. The tenant name is stored in the header and the resolver can process it nicely. No OIDC yet.

Where I struggle is how to deal with configuration. The app needs to send emails out and the SMTP details are specific to tenants. 

Where would I put such configs in such a way that the app only sees the config relevant to the HTTP request in scope? I though of using configmaps, but I do not see how these configs will be separated.

Thoughts?

Brand.



Dmitry Shultz

unread,
Jul 27, 2021, 2:20:32 AM7/27/21
to brand....@gmail.com, Quarkus Development mailing list
Custom config resolver may fit nicely. 
You still can have one config map, but potentially can resolve config for each tenant in the context. Here is sample of json value representing some config ( qddns.vendor key) https://github.com/zeppelinux/quarked-ddns/blob/main/src/main/helm/charts/values.yaml

Dmitry


--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CABEjM6QCS7KJB%2B%2B%2Boy8gEpnyLzh7e6qCdTZh27J6Wb2mgESnhQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages