2
0
mirror of synced 2025-02-04 20:54:09 +00:00

29 lines
919 B
C#
Raw Normal View History

2023-04-12 13:53:55 +02:00
namespace KubernetesWorkflow
{
public class RunningPod
{
private readonly Dictionary<ContainerRecipe, Port[]> servicePortMap;
2023-04-13 11:07:36 +02:00
public RunningPod(K8sCluster cluster, string name, string ip, string deploymentName, string serviceName, Dictionary<ContainerRecipe, Port[]> servicePortMap)
2023-04-12 13:53:55 +02:00
{
Cluster = cluster;
Name = name;
Ip = ip;
2023-04-13 11:07:36 +02:00
DeploymentName = deploymentName;
ServiceName = serviceName;
2023-04-12 13:53:55 +02:00
this.servicePortMap = servicePortMap;
}
public K8sCluster Cluster { get; }
public string Name { get; }
public string Ip { get; }
2023-04-13 11:07:36 +02:00
internal string DeploymentName { get; }
internal string ServiceName { get; }
2023-04-12 13:53:55 +02:00
public Port[] GetServicePortsForContainerRecipe(ContainerRecipe containerRecipe)
{
return servicePortMap[containerRecipe];
}
}
}