The namespace is currently provided on /run as part of the environment context. I think the entire context should be moved to /init. This would also address your use case. Wdyt.
-r > On Nov 5, 2019, at 12:04 AM, Seong Hyun Oh <seonghyu...@gmail.com> wrote: > > Hi, whiskers. > I want to discuss adding a new field `namespace` in the `/init` API [1] > that initializes the action. > > The action runtime does not know the namespace information when the action > is initialized. > In some cases, this namespace information can be useful. > > E.g, > - Initializing a monitoring tool such as APM (Application Performance > Management) > - Custom docker actions that require a namespace for initialization > > If the namespace is not provided at action init time, runtimes that need a > namespace should check the namespace every time when action is run. > > I'd like to have your views on this proposal > > { > "value": { > "namespace": String, <- this `namespace` field will be added > "name" : String, > "main" : String, > "code" : String, > "binary": Boolean, > "env": Map[String, String] > } > } > > Thanks > Seonghyun > > [1] > https://github.com/apache/openwhisk/blob/master/docs/actions-new.md#initialization