For an incoming admission request, we need to know the target namespace
in order to read per-namespace configuration and handle the request
accordingly. Since the namespace of the target object isn't always
populated from the beginning, read the namespace from the admission
request instead.
Note that there can be admission requests where namespace is not set,
it's an optional field. In the case of pod admission, we probably can
expect it though and error out if not set.
For an incoming admission request, we need to know the target namespace in order to read per-namespace configuration and handle the request accordingly. Since the namespace of the target object isn't always populated from the beginning, read the namespace from the admission request instead.
Note that there can be admission requests where namespace is not set, it's an optional field. In the case of pod admission, we probably can expect it though and error out if not set.