GetWatchNamespace returns the namespace the operator should be watching for changes This function was ported over from Operator SDK 0.17.0
()
| 44 | // |
| 45 | // This function was ported over from Operator SDK 0.17.0 |
| 46 | func 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. |
no outgoing calls
no test coverage detected