This seems to be little better approach as clients can directly control or insert. In CI/CD environment also, we might offer this UUID to all clients whether they use it or not as a standard infra variable.
Am still looking any other best and easy options??
If you need this at runtime for your application, another way is to generate the uuid in the entrypoint command:
Let's say your container runs "/usr/bin/myapp" on start up.
You can change containers.command to be something like:
env UUID=$(uuidgen) /usr/bin/myapp
Of course that has drawbacks:
- Processes you run via `oc exec` or `oc rsh` will not know about the variable (which might be an advantage depending on what you want)
- You cannot inspect it from the Web Console or CLI, only if you add some plugs to your app or some hackish logging to the command above
- perhaps others
Rodolfo Carvalho | OpenShift
On Tue, Oct 11, 2016 at 7:29 PM, Srinivas Naga Kotaru (skotaru) <skotaru cisco com> wrote: