| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: service-dns-no-addr |
| namespace: ns2 |
| spec: |
| hosts: |
| - random-1.host.example |
| # expect address to be auto allocated |
| ports: |
| - number: 80 |
| name: http |
| protocol: HTTP |
| resolution: DNS |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: service-dns-with-addr |
| namespace: ns2 |
| spec: |
| hosts: |
| - random-2.host.example |
| addresses: |
| - 9.9.9.9 |
| ports: |
| - number: 80 |
| name: http |
| protocol: HTTP |
| resolution: DNS |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: service-static-no-addr |
| namespace: ns2 |
| spec: |
| hosts: |
| - random-3.host.example |
| # expect address to be auto allocated |
| ports: |
| - number: 80 |
| name: http |
| protocol: HTTP |
| resolution: STATIC |
| location: MESH_INTERNAL |
| endpoints: |
| - address: 1.2.3.4 |
| labels: |
| security.istio.io/tlsMode: istio |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: service-none-wildcard |
| namespace: ns2 |
| spec: |
| hosts: |
| - "*.random-4.host.example" |
| # expect no address to be auto allocated |
| ports: |
| - number: 80 |
| name: http |
| protocol: HTTP |
| resolution: NONE |
| --- |
| # this should not have any name table entry |
| # as we dont auto allocate for none mode services |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: service-none-no-wildcard |
| namespace: ns2 |
| spec: |
| hosts: |
| - random-5.host.example |
| ports: |
| - number: 80 |
| name: http |
| protocol: HTTP |
| resolution: NONE |
| --- |
| apiVersion: networking.istio.io/v1beta1 |
| kind: ServiceEntry |
| metadata: |
| name: cidr |
| spec: |
| addresses: |
| - 198.51.100.0/31 |
| hosts: |
| - address.internal |
| ports: |
| - name: tcp |
| number: 8888 |
| protocol: TCP |