2020-08-05 16:15:36 +00:00
|
|
|
import pulumi
|
|
|
|
import pulumi_kubernetes as kubernetes
|
|
|
|
|
2020-08-05 19:50:54 +00:00
|
|
|
bar = kubernetes.core.v1.Pod("bar",
|
2020-08-05 16:15:36 +00:00
|
|
|
api_version="v1",
|
2020-11-25 01:15:37 +00:00
|
|
|
metadata=kubernetes.meta.v1.ObjectMetaArgs(
|
|
|
|
namespace="foo",
|
|
|
|
name="bar",
|
2023-12-23 11:26:01 +00:00
|
|
|
labels={
|
|
|
|
"app.kubernetes.io/name": "cilium-agent",
|
|
|
|
"app.kubernetes.io/part-of": "cilium",
|
|
|
|
"k8s-app": "cilium",
|
|
|
|
},
|
2020-11-25 01:15:37 +00:00
|
|
|
),
|
|
|
|
spec=kubernetes.core.v1.PodSpecArgs(
|
2022-12-15 22:45:07 +00:00
|
|
|
containers=[
|
|
|
|
kubernetes.core.v1.ContainerArgs(
|
|
|
|
name="nginx",
|
|
|
|
image="nginx:1.14-alpine",
|
|
|
|
ports=[kubernetes.core.v1.ContainerPortArgs(
|
|
|
|
container_port=80,
|
|
|
|
)],
|
|
|
|
resources=kubernetes.core.v1.ResourceRequirementsArgs(
|
|
|
|
limits={
|
|
|
|
"memory": "20Mi",
|
|
|
|
"cpu": "0.2",
|
|
|
|
},
|
|
|
|
),
|
2020-11-25 01:15:37 +00:00
|
|
|
),
|
2022-12-15 22:45:07 +00:00
|
|
|
kubernetes.core.v1.ContainerArgs(
|
|
|
|
name="nginx2",
|
|
|
|
image="nginx:1.14-alpine",
|
|
|
|
ports=[kubernetes.core.v1.ContainerPortArgs(
|
|
|
|
container_port=80,
|
|
|
|
)],
|
|
|
|
resources=kubernetes.core.v1.ResourceRequirementsArgs(
|
|
|
|
limits={
|
|
|
|
"memory": "20Mi",
|
|
|
|
"cpu": "0.2",
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2020-11-25 01:15:37 +00:00
|
|
|
))
|
2024-02-11 17:02:12 +00:00
|
|
|
# Test that we can assign from a constant without type errors
|
2022-11-22 01:15:05 +00:00
|
|
|
kind = bar.kind
|