MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / GetWatchNamespace

Function GetWatchNamespace

pkg/infrastructure/namespace.go:46–52  ·  view source on GitHub ↗

GetWatchNamespace returns the namespace the operator should be watching for changes This function was ported over from Operator SDK 0.17.0

()

Source from the content-addressed store, hash-verified

44//
45// This function was ported over from Operator SDK 0.17.0
46func GetWatchNamespace() (string, error) {
47 ns, found := os.LookupEnv(WatchNamespaceEnvVar)
48 if !found {
49 return "", fmt.Errorf("%s must be set", WatchNamespaceEnvVar)
50 }
51 return ns, nil
52}
53
54// GetNamespace gets the namespace of the operator by checking GetOperatorNamespace and GetWatchNamespace in that order.
55// Returns an error if both GetOperatorNamespace and GetWatchNamespace return an error.

Callers 2

mainFunction · 0.92
GetNamespaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected