()
| 21 | } |
| 22 | |
| 23 | function getKubernetesNamespaceSignal() { |
| 24 | if (!existsSync(KUBERNETES_NAMESPACE_PATH)) { |
| 25 | return { hasSignal: false, namespace: null } |
| 26 | } |
| 27 | |
| 28 | try { |
| 29 | const namespace = readFileSync(KUBERNETES_NAMESPACE_PATH, 'utf8').trim() |
| 30 | return { hasSignal: true, namespace: namespace.length > 0 ? namespace : null } |
| 31 | } catch { |
| 32 | // Conservative: namespace mount exists but we could not read it. |
| 33 | return { hasSignal: true, namespace: null } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | function getConfiguredNamespace() { |
| 38 | const namespace = process.env.COO_NAMESPACE |
no test coverage detected