Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NamespaceEnvKey is the environment variable that specifies the system namespace. NamespaceEnvKey = "SYSTEM_NAMESPACE" // ResourceLabelEnvKey is the environment variable that specifies the system resource // label. This label should be used to limit the number of configmaps that are watched // in the system namespace. ResourceLabelEnvKey = "SYSTEM_RESOURCE_LABEL" )
Variables ¶
This section is empty.
Functions ¶
func Namespace ¶
func Namespace() string
Namespace returns the name of the K8s namespace where our system components run.
func PodName ¶
func PodName() string
PodName will read various env vars to determine the name of the running pod before falling back
First it will read 'POD_NAME' this is expected to be populated using the Kubernetes downward API.
env: - name: MY_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name
As a fallback it will read HOSTNAME. This is undocumented Kubernetes behaviour that podman, cri-o and containerd have inherited from docker.
If none of these env-vars is set PodName will return an empty string
func ResourceLabel ¶
func ResourceLabel() string
ResourceLabel returns the label key identifying K8s objects our system components source their configuration from.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.