istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/serviceentry-missing-addresses-protocol.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: ServiceEntry 3 metadata: 4 name: service-entry-test-01 # Expected: no validation error 5 namespace: default 6 spec: 7 hosts: 8 - 'istio.io' 9 exportTo: 10 - "." 11 ports: 12 - number: 443 13 name: https 14 protocol: HTTPS 15 location: MESH_EXTERNAL 16 resolution: DNS 17 --- 18 apiVersion: networking.istio.io/v1alpha3 19 kind: ServiceEntry 20 metadata: 21 name: service-entry-test-02 # Expected: no validation error 22 namespace: default 23 spec: 24 hosts: 25 - 'istio.io' 26 addresses: 27 - 10.0.0.1 28 exportTo: 29 - "." 30 ports: 31 - number: 443 32 name: https 33 protocol: HTTPS 34 location: MESH_EXTERNAL 35 resolution: DNS 36 --- 37 apiVersion: networking.istio.io/v1alpha3 38 kind: ServiceEntry 39 metadata: 40 name: service-entry-test-03 # Expected: validation error missing addresses and protocol 41 namespace: default 42 spec: 43 hosts: 44 - 'istio.io' 45 exportTo: 46 - "." 47 ports: 48 - number: 443 49 name: https 50 location: MESH_EXTERNAL 51 resolution: DNS 52 --- 53 apiVersion: networking.istio.io/v1alpha3 54 kind: ServiceEntry 55 metadata: 56 name: service-entry-test-04 # Expected: validation error missing addresses and protocol 57 namespace: default 58 spec: 59 hosts: 60 - 'istio.io' 61 exportTo: 62 - "." 63 ports: 64 - number: 443 65 name: https 66 protocol: "" 67 location: MESH_EXTERNAL 68 resolution: DNS 69 --- 70 apiVersion: networking.istio.io/v1alpha3 71 kind: ServiceEntry 72 metadata: 73 name: service-entry-test-05 # Expected: no validation error 74 namespace: default 75 spec: 76 hosts: 77 - 'istio.io' 78 exportTo: 79 - "." 80 ports: 81 - number: 443 82 name: https 83 protocol: HTTPS 84 location: MESH_EXTERNAL 85 resolution: DNS 86 --- 87 apiVersion: networking.istio.io/v1alpha3 88 kind: ServiceEntry 89 metadata: 90 name: service-entry-test-06 # Expected: no validation error 91 namespace: default 92 spec: 93 hosts: 94 - 'istio.io' 95 addresses: 96 - 10.0.0.1 97 exportTo: 98 - "." 99 ports: 100 - number: 443 101 name: https 102 protocol: TCP 103 location: MESH_EXTERNAL 104 resolution: DNS 105 --- 106 apiVersion: networking.istio.io/v1alpha3 107 kind: ServiceEntry 108 metadata: 109 name: service-entry-test-07 # Expected: validation error missing addresses with protocol TCP 110 namespace: default 111 spec: 112 hosts: 113 - 'istio.io' 114 exportTo: 115 - "." 116 ports: 117 - number: 443 118 name: https 119 protocol: TCP 120 location: MESH_EXTERNAL 121 resolution: DNS