Skip to content

Commit eb32ccc

Browse files
committed
handle case where we are doing cluster setup and we have cluster setup namespace, but no deployment namespace
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent c3f33bd commit eb32ccc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/core/lease/lease_manager.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ export class LeaseManager {
5757
}
5858

5959
private async currentNamespace (): Promise<string> {
60-
const namespace = this.configManager.getFlag<string>(flags.namespace)
61-
if (!namespace) return null
60+
const deploymentNamespace = this.configManager.getFlag<string>(flags.namespace)
61+
const clusterSetupNamespace = this.configManager.getFlag<string>(flags.clusterSetupNamespace)
62+
63+
if (!deploymentNamespace && !clusterSetupNamespace) {
64+
return null
65+
}
66+
const namespace = deploymentNamespace ? deploymentNamespace : clusterSetupNamespace
6267

6368
if (!await this.k8.hasNamespace(namespace)) {
6469
await this.k8.createNamespace(namespace)

0 commit comments

Comments
 (0)