istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/xds/testdata/benchmarks/serviceentry-workloadentry.yaml (about)

     1  # Set up a Service associated with our proxy, which will run as 1.1.1.1 IP
     2  apiVersion: networking.istio.io/v1alpha3
     3  kind: ServiceEntry
     4  metadata:
     5    name: proxy-service-instance
     6  spec:
     7    hosts:
     8      - example.com
     9    ports:
    10      - number: 80
    11        name: http
    12        protocol: HTTP
    13      - number: 7070
    14        name: tcp
    15        protocol: TCP
    16      - number: 443
    17        name: https
    18        protocol: HTTPS
    19      - number: 9090
    20        name: auto
    21        protocol: ""
    22    resolution: STATIC
    23    location: MESH_INTERNAL
    24    endpoints:
    25      - address: 1.1.1.1
    26        labels:
    27          security.istio.io/tlsMode: istio
    28  ---
    29  # Set up .Services number of services. Each will have 4 ports (one for each protocol)
    30  {{- range $i := until .Services }}
    31  apiVersion: networking.istio.io/v1alpha3
    32  kind: ServiceEntry
    33  metadata:
    34    name: service-{{$i}}
    35  spec:
    36    hosts:
    37      - random-{{$i}}.host.example
    38    ports:
    39      - number: 80
    40        name: http
    41        protocol: HTTP
    42      - number: 7070
    43        name: tcp
    44        protocol: TCP
    45      - number: 443
    46        name: https
    47        protocol: HTTPS
    48      - number: 9090
    49        name: auto
    50    resolution: STATIC
    51    location: MESH_INTERNAL
    52    workloadSelector:
    53      labels:
    54        app: random-{{$i}}
    55  
    56  ---
    57  {{- end }}
    58  
    59  ---
    60  {{- range $j := until .Instances }}
    61  apiVersion: networking.istio.io/v1alpha3
    62  kind: WorkloadEntry
    63  metadata:
    64    name: random-{{$j}}
    65  spec:
    66    serviceAccount: random
    67    address: 10.10.10.10
    68    labels:
    69      app: random-{{mod $j $.Services}}
    70  ---
    71  {{- end }}