Skip to content
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

Allow to programmatically enable a route #540

Closed
nicolaferraro opened this issue Oct 26, 2020 · 3 comments
Closed

Allow to programmatically enable a route #540

nicolaferraro opened this issue Oct 26, 2020 · 3 comments

Comments

@nicolaferraro
Copy link
Member

Currently routes are loaded via properties, e.g.:

camel.k.sources[0].location=file:/etc/camel/sources/i-source-000/display.groovy
camel.k.sources[0].name=display
camel.k.sources[0].language=groovy

I was thinking to add a property like:

camel.k.sources[0].enabled=false

That could be used to enable/disable a route (default true).

I'd use that in the operator this way:

camel.k.sources[0].enabled={{hostname-matches:display-0}}

Where hostname-matches is a property-function (we should define it in the runtime), that evaluates to true or false depending on the current name of the pod (HOSTNAME env variable).

This can allow us to assign partition keys to various pods in a StatefulSet.
I'm open to alternatives :D.

@lburgazzoli
Copy link
Contributor

you mean not to load the route source entirely ?

@nicolaferraro
Copy link
Member Author

Yes, that was the purpose. Which also may simplify the monitoring part because routes will run only once in a cluster.

@nicolaferraro
Copy link
Member Author

Not needed after this is merged: apache/camel#4662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants