Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotInCluster = errors.New("not running within a kubernetes cluster")
ErrNotInCluster is returned if the process is not running within a Kubernetes cluster.
Functions ¶
func Namespace ¶
Namespace returns the namespace that the current container is running in, if it is running within a Kubernetes cluster. If not, an error is returned.
Code slightly modified from: https://github.com/kubernetes-sigs/controller-runtime/blob/v0.8.3/pkg/leaderelection/leader_election.go#L104-L120
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.