ancient-megabyte-79588
01/19/2021, 12:09 AMvar namespace = new k8s.core.v1.Namespace(defaultNamespaceName, {
metadata: {
name: defaultNamespaceName,
}
}, { provider: config.k8sProvider, import: "releasesplatform" });
This does not work. Possibly I have the import id incorrect?
var namespace = new k8s.core.v1.Namespace(defaultNamespaceName, {
metadata: {
name: defaultNamespaceName,
}
}, { provider: config.k8sProvider, id: "releasesplatform" });
Does not work. again, perhaps an Id problem?
var namespace = k8s.core.v1.Namespace.get(defaultNamespaceName, defaultNamespace);
if (namespace == null) {
// create namespace
}
Doesn't seem to work to get the existing resource either. My code always tries to create. I'm not sure what get
returns if nothing exists though. Intellisense says it should be a namespace
typed object, but might be a promise which would not be null.
Anyway, wondering if anyone else has solved this problem of creating a k8s namespace in one app, and trying to find it in another.billowy-army-68599
ancient-megabyte-79588
01/19/2021, 1:07 AMbillowy-army-68599
ancient-megabyte-79588
01/19/2021, 1:10 AM