Skip to content

Get ocelot to work with workload identity and reload bearer after specific time #2236

Answered by raman-m
muhmuhhum asked this question in Q&A
Discussion options

You must be logged in to vote

We are using Ocelot with Workload identity and it works perfectly fine for exactly 1 hour cause then the token will not be valid anymore and no reload is happening.

It appears you need to upload a new configuration file, namely ocelot.json, to the Ocelot instance.

Is there a way to reload the token after 1 hour or reload ocelot to recreate the KubeClient after 1 hour or something like that ?

Since the token is part of the ServiceDiscoveryProvider global settings, you need a new token with a ocelot.json file inside the created Ocelot instance. To reuse the new service discovery token:

  1. Create a new Docker image with a preinstalled ocelot.json containing the updated config. Then deploy …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Service Discovery Ocelot feature: Service Discovery Configuration Ocelot feature: Configuration Kubernetes Service discovery by Kubernetes Administration Ocelot feature: Administration
2 participants