sparse-intern-71089
10/29/2021, 6:26 PMbillowy-army-68599
billowy-army-68599
const ns = new k8s.core.v1.Namespace(name, {}, { provider: cluster.provider });
victorious-exabyte-70545
10/29/2021, 6:34 PMvictorious-exabyte-70545
10/29/2021, 6:34 PMbillowy-army-68599
ns = Namespace("ns", metadata={
"name": "example-namespace",
},
opts=pulumi.ResourceOptions(provider=provider),
)
victorious-exabyte-70545
10/29/2021, 6:46 PMvictorious-exabyte-70545
10/29/2021, 6:51 PMvictorious-exabyte-70545
10/29/2021, 6:51 PMnamespace = Namespace(
"nifi",
spec={
"hard": {"requests.cpu": "1"},
"requests.memory": "1Gi",
"limits.cpu": "2",
"limits.memory": "2Gi"
},
metadata={"name": "nifi"},
opts=ResourceOptions(provider=k8s_provider),
)
billowy-army-68599
ns = k8s.core.v1.Namespace("example", k8s.core.v1.NamespaceArgs(
metadata=k8s.meta.v1.ObjectMetaArgs(
name="foo"
)
))
It looks like kubernetes has moved limits from the spec and onto a ResourceQuota type which you can spot by using the strong typingvictorious-exabyte-70545
10/29/2021, 7:17 PMbillowy-army-68599
victorious-exabyte-70545
10/29/2021, 7:19 PMvictorious-exabyte-70545
10/29/2021, 7:20 PMvictorious-exabyte-70545
10/29/2021, 7:21 PMvictorious-exabyte-70545
10/29/2021, 7:21 PMvictorious-exabyte-70545
10/29/2021, 7:21 PMvictorious-exabyte-70545
10/29/2021, 9:21 PMbillowy-army-68599