static Option <V1ServicePort> ExtractExposedPort(string exposedPort) => PortAndProtocol.Parse(exposedPort) .Map(portAndProtocol => new V1ServicePort(portAndProtocol.Port, name: $"ExposedPort-{portAndProtocol.Port}-{portAndProtocol.Protocol}".ToLowerInvariant(), protocol: portAndProtocol.Protocol));
static IEnumerable <V1ServicePort> ExtractHostPorts(string name, IEnumerable <PortBinding> bindings) => PortAndProtocol.Parse(name) .Map(
static Option <V1ContainerPort> ExtractContainerPort(string exposedPort) => PortAndProtocol.Parse(exposedPort) .Map(portAndProtocol => new V1ContainerPort(portAndProtocol.Port, protocol: portAndProtocol.Protocol));