18 lines
359 B
Go
Raw Permalink Normal View History

2018-12-05 19:30:52 -05:00
package namespaces
import (
"os"
)
const (
2026-02-06 13:38:41 -08:00
DefaultNamespace = "agentgateway-system"
2018-12-05 19:30:52 -05:00
)
2026-02-06 13:38:41 -08:00
// GetPodNamespace returns the value of the env var `POD_NAMESPACE` and defaults to `agentgateway-system` if unset
2018-12-05 19:30:52 -05:00
func GetPodNamespace() string {
if podNamespace := os.Getenv("POD_NAMESPACE"); podNamespace != "" {
return podNamespace
}
return DefaultNamespace
}