2022-07-21 19:04:02 +00:00
|
|
|
using System.Collections.Generic;
|
2023-03-24 11:43:46 +00:00
|
|
|
using System.Linq;
|
2020-08-05 16:15:36 +00:00
|
|
|
using Pulumi;
|
|
|
|
using Kubernetes = Pulumi.Kubernetes;
|
|
|
|
|
2022-07-21 19:04:02 +00:00
|
|
|
return await Deployment.RunAsync(() =>
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
var bar = new Kubernetes.Core.V1.Pod("bar", new()
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
ApiVersion = "v1",
|
|
|
|
Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
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" },
|
|
|
|
},
|
2022-07-21 19:04:02 +00:00
|
|
|
},
|
|
|
|
Spec = new Kubernetes.Types.Inputs.Core.V1.PodSpecArgs
|
|
|
|
{
|
|
|
|
Containers = new[]
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
new Kubernetes.Types.Inputs.Core.V1.ContainerArgs
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
Name = "nginx",
|
|
|
|
Image = "nginx:1.14-alpine",
|
2022-10-13 09:47:01 +00:00
|
|
|
Ports = new[]
|
|
|
|
{
|
|
|
|
new Kubernetes.Types.Inputs.Core.V1.ContainerPortArgs
|
|
|
|
{
|
|
|
|
ContainerPortValue = 80,
|
|
|
|
},
|
|
|
|
},
|
2022-07-21 19:04:02 +00:00
|
|
|
Resources = new Kubernetes.Types.Inputs.Core.V1.ResourceRequirementsArgs
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
Limits =
|
2020-08-05 16:15:36 +00:00
|
|
|
{
|
2022-07-21 19:04:02 +00:00
|
|
|
{ "memory", "20Mi" },
|
|
|
|
{ "cpu", "0.2" },
|
2020-08-05 16:15:36 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-12-15 22:45:07 +00:00
|
|
|
new Kubernetes.Types.Inputs.Core.V1.ContainerArgs
|
|
|
|
{
|
|
|
|
Name = "nginx2",
|
|
|
|
Image = "nginx:1.14-alpine",
|
|
|
|
Ports = new[]
|
|
|
|
{
|
|
|
|
new Kubernetes.Types.Inputs.Core.V1.ContainerPortArgs
|
|
|
|
{
|
|
|
|
ContainerPortValue = 80,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Resources = new Kubernetes.Types.Inputs.Core.V1.ResourceRequirementsArgs
|
|
|
|
{
|
|
|
|
Limits =
|
|
|
|
{
|
|
|
|
{ "memory", "20Mi" },
|
|
|
|
{ "cpu", "0.2" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-08-05 16:15:36 +00:00
|
|
|
},
|
2022-07-21 19:04:02 +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
|
|
|
var kind = bar.Kind;
|
|
|
|
|
2022-07-21 19:04:02 +00:00
|
|
|
});
|
2020-08-05 16:15:36 +00:00
|
|
|
|