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
Populate an INSTANCE_NUM env var #1039
Comments
It's already populated at the container labels so makes sense to have it in the envs also. |
Not only an env var (very useful, but it would be good to be able to reference it in the kontena.yml for, say, affinity rules or volume references, just as (presumably) Sorry for possible scope creep :-) |
For the volume references we do have support for, see: https://github.com/kontena/examples/blob/master/wordpress-cluster/kontena.yml#L41 You just have to make sure that you do have same amount of instances defined for both services, obviously. :) |
woah... what is the syntax of this? (is it documented)? Can I use this syntax in any kontena.yml value or just for certain keys (which would apparently include volumes_from)? |
Please populate an environment variable with the instance number of the service. Some software, like Apache ZooKeeper and Apache Kafka, for example, want to know which instance they are to know who's who.
The text was updated successfully, but these errors were encountered: