2026-02-09 16:20:45 -08:00

18 lines
359 B
Go

package namespaces
import (
"os"
)
const (
DefaultNamespace = "agentgateway-system"
)
// GetPodNamespace returns the value of the env var `POD_NAMESPACE` and defaults to `agentgateway-system` if unset
func GetPodNamespace() string {
if podNamespace := os.Getenv("POD_NAMESPACE"); podNamespace != "" {
return podNamespace
}
return DefaultNamespace
}