2023-04-12 11:53:55 +00:00
|
|
|
|
namespace KubernetesWorkflow
|
|
|
|
|
{
|
|
|
|
|
public class ContainerRecipe
|
|
|
|
|
{
|
2023-04-12 13:11:36 +00:00
|
|
|
|
public ContainerRecipe(int number, string image, Port[] exposedPorts, Port[] internalPorts, EnvVar[] envVars)
|
2023-04-12 11:53:55 +00:00
|
|
|
|
{
|
2023-04-12 13:11:36 +00:00
|
|
|
|
Number = number;
|
2023-04-12 11:53:55 +00:00
|
|
|
|
Image = image;
|
|
|
|
|
ExposedPorts = exposedPorts;
|
|
|
|
|
InternalPorts = internalPorts;
|
|
|
|
|
EnvVars = envVars;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-12 13:11:36 +00:00
|
|
|
|
public string Name { get { return $"ctnr{Number}"; } }
|
|
|
|
|
public int Number { get; }
|
2023-04-12 11:53:55 +00:00
|
|
|
|
public string Image { get; }
|
|
|
|
|
public Port[] ExposedPorts { get; }
|
|
|
|
|
public Port[] InternalPorts { get; }
|
|
|
|
|
public EnvVar[] EnvVars { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Port
|
|
|
|
|
{
|
|
|
|
|
public Port(int number)
|
|
|
|
|
{
|
|
|
|
|
Number = number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int Number { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class EnvVar
|
|
|
|
|
{
|
|
|
|
|
public EnvVar(string name, string value)
|
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Value = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name { get; }
|
|
|
|
|
public string Value { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|