istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/xds/testdata/nds-se.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: ServiceEntry 3 metadata: 4 name: service-dns-no-addr 5 namespace: ns2 6 spec: 7 hosts: 8 - random-1.host.example 9 # expect address to be auto allocated 10 ports: 11 - number: 80 12 name: http 13 protocol: HTTP 14 resolution: DNS 15 --- 16 apiVersion: networking.istio.io/v1alpha3 17 kind: ServiceEntry 18 metadata: 19 name: service-dns-with-addr 20 namespace: ns2 21 spec: 22 hosts: 23 - random-2.host.example 24 addresses: 25 - 9.9.9.9 26 ports: 27 - number: 80 28 name: http 29 protocol: HTTP 30 resolution: DNS 31 --- 32 apiVersion: networking.istio.io/v1alpha3 33 kind: ServiceEntry 34 metadata: 35 name: service-static-no-addr 36 namespace: ns2 37 spec: 38 hosts: 39 - random-3.host.example 40 # expect address to be auto allocated 41 ports: 42 - number: 80 43 name: http 44 protocol: HTTP 45 resolution: STATIC 46 location: MESH_INTERNAL 47 endpoints: 48 - address: 1.2.3.4 49 labels: 50 security.istio.io/tlsMode: istio 51 --- 52 apiVersion: networking.istio.io/v1alpha3 53 kind: ServiceEntry 54 metadata: 55 name: service-none-wildcard 56 namespace: ns2 57 spec: 58 hosts: 59 - "*.random-4.host.example" 60 # expect no address to be auto allocated 61 ports: 62 - number: 80 63 name: http 64 protocol: HTTP 65 resolution: NONE 66 --- 67 # this should not have any name table entry 68 # as we dont auto allocate for none mode services 69 apiVersion: networking.istio.io/v1alpha3 70 kind: ServiceEntry 71 metadata: 72 name: service-none-no-wildcard 73 namespace: ns2 74 spec: 75 hosts: 76 - random-5.host.example 77 ports: 78 - number: 80 79 name: http 80 protocol: HTTP 81 resolution: NONE 82 --- 83 apiVersion: networking.istio.io/v1beta1 84 kind: ServiceEntry 85 metadata: 86 name: cidr 87 spec: 88 addresses: 89 - 198.51.100.0/31 90 hosts: 91 - address.internal 92 ports: 93 - name: tcp 94 number: 8888 95 protocol: TCP