-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explore router statefulset #258
Comments
Issue trying to solve:
Unfortunately, you can only read another variable after it is deployed, so this cant be used to dynamically set the reference to a token secret. But if the entry script is altered and is able to read ZITI_ENROLL_TOKEN, then retrieve that token from the secrets store by using its name as a key. Maybe? Another way perhaps is to use Operator Pattern and read/even create the token directly on the Ziti Controller at run time and patch the statefulset with new token ENV VAR everytime a new container comes up. I did and continue to explore this avenue, but it is tricky. Most likely one would need to create the configmap/secret and patch that instead, this option still to be verified though. Some notes on this:
Last thought on this, if we are going down the road of Operator Pattern, then perhaps it makes more sense to just manage more than one single deployments and token env var is created at the time of rendering the deployment details not at the run time . Options part of new CR would be for example for users to choose from:
|
Update on run-time token retrieval and replacement from ConfigMap, it works much better than using env vars update. Definitely would be the way to go if decided to go this way. Snippets of Code:
ConfigMap
StatefulSet:
|
I favor leaning into the operator over trying to keep a multi-router deployment as similar as possible to today's single-router deployment. The operator could run in the same cluster as ziti controller and hold service accounts for other clusters where it deploys routers by calling the other cluster's kube API (probably via a ziti service), or the operator could be installed in each cluster and hold a ziti admin credential (probably a cert), in which case the operator would provision either controller(s) or router(s) or both. |
No description provided.
The text was updated successfully, but these errors were encountered: