Istio入口网关默认情况下公开以下端口:
80:31380/TCP,443:31390/TCP,31400:31400/TCP
Run Code Online (Sandbox Code Playgroud)
为什么要公开31400并将其映射到31400?我在文档或其他地方找不到对此的解释。
背景:我正在遵循使用Istio 0.8.0的“ 通过头盔进行安装”helm template指南。部署清单是从https://github.com/istio/istio/tree/0.8.0/install/kubernetes/helm/istio构建的,给出了以下入口网关服务定义:
# Source: istio/charts/ingressgateway/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: istio-ingressgateway
namespace: istio-system
labels:
chart: ingressgateway-0.8.0
release: istio
heritage: Tiller
istio: ingressgateway
spec:
type: NodePort
selector:
istio: ingressgateway
ports:
-
name: http
nodePort: 31380
port: 80
-
name: https
nodePort: 31390
port: 443
-
name: tcp
nodePort: 31400
port: 31400
Run Code Online (Sandbox Code Playgroud) 与以下 xUnit/FluentAssertions 组合最接近的 FluentAssertions 等效项是什么?
Assert.Collection(things,
thing =>
{
thing.Id.Should().Be(guid1);
thing.Name.Should().Be("Thing1");
thing.Attributes.Should().NotBeNull();
thing.FullName.Should().MatchRegex("^Thing1 [^ ]+$");
},
thing =>
{
thing.Id.Should().Be(guid2);
thing.Name.Should().Be("Thing2");
thing.Attributes.Should().NotBeNull();
thing.FullName.Should().MatchRegex("^Thing2 [^ ]+$");
});
Run Code Online (Sandbox Code Playgroud)
在某些情况下,我发现这种风格比断言集合相等或等价的 FluentAssertions 方法更具表现力和/或更简洁。
Assert.Collection 签名:
/// <summary>
/// Verifies that a collection contains exactly a given number of elements, which meet
/// the criteria provided by the element inspectors.
/// </summary>
/// <typeparam name="T">The type of the object to be verified</typeparam>
/// <param name="collection">The collection to be inspected</param>
/// <param name="elementInspectors">The element inspectors, which …Run Code Online (Sandbox Code Playgroud)