Class DefaultNamespaceResolver

java.lang.Object
io.micronaut.kubernetes.client.DefaultNamespaceResolver
All Implemented Interfaces:
NamespaceResolver

@Singleton @Requires(env="k8s") public class DefaultNamespaceResolver extends Object implements NamespaceResolver
Default implemention of NamespaceResolver. The resolution of namespace is evaluated in this order:
  1. Value configured by `kubernetes.client.namespace`.
  2. If the application is running inside a pod then the namespace is read from file `/var/run/secrets/kubernetes.io/serviceaccount/namespace`.
  3. Namespace is set do `default`.
Since:
3.1
Author:
Pavol Gressa