istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/multicluster/inconsistent-service-1.yaml (about) 1 # Same service as cluster2, should not report warning. 2 apiVersion: v1 3 kind: Service 4 metadata: 5 name: my-service 6 namespace: my-namespace 7 spec: 8 selector: 9 app: my-service 10 ports: 11 - name: tcp-foo 12 protocol: TCP 13 port: 8080 14 targetPort: 8080 15 --- 16 # Service with extra port in cluster2, should generate warning. 17 apiVersion: v1 18 kind: Service 19 metadata: 20 name: extra-port 21 namespace: my-namespace 22 spec: 23 selector: 24 app: my-service 25 ports: 26 - name: tcp-foo 27 protocol: TCP 28 port: 8080 29 targetPort: 8080 30 --- 31 # Service with inconsistent port name, should generate warning. 32 apiVersion: v1 33 kind: Service 34 metadata: 35 name: inconsistent-port-name 36 namespace: my-namespace 37 spec: 38 selector: 39 app: my-service 40 ports: 41 - name: tcp-foo 42 protocol: TCP 43 port: 8080 44 targetPort: 8080 45 --- 46 # Service is mixed mode(clusterIP and headless), should generate warning. 47 apiVersion: v1 48 kind: Service 49 metadata: 50 name: mixed-mode 51 namespace: my-namespace 52 spec: 53 clusterIP: 1.2.3.4 54 selector: 55 app: my-service 56 ports: 57 - name: tcp-foo 58 protocol: TCP 59 port: 8080 60 targetPort: 8080 61 --- 62 # Service is mixed type, should generate warning. 63 apiVersion: v1 64 kind: Service 65 metadata: 66 name: mixed-type 67 namespace: my-namespace 68 spec: 69 type: ClusterIP 70 selector: 71 app: my-service 72 ports: 73 - name: tcp-foo 74 protocol: TCP 75 port: 8080 76 targetPort: 8080 77 --- 78 # Service is mixed with port protocols, should generate warning. 79 apiVersion: v1 80 kind: Service 81 metadata: 82 name: mixed-port-protocol 83 namespace: my-namespace 84 spec: 85 type: ClusterIP 86 selector: 87 app: my-service 88 ports: 89 - name: tcp 90 protocol: TCP 91 port: 8080 92 targetPort: 8080