istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/multicluster/inconsistent-service-2.yaml (about) 1 # Same service as cluster1, 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 - name: tcp-bar 31 protocol: TCP 32 port: 8081 33 targetPort: 8081 34 --- 35 # Service with inconsistent port name, should generate warning. 36 apiVersion: v1 37 kind: Service 38 metadata: 39 name: inconsistent-port-name 40 namespace: my-namespace 41 spec: 42 selector: 43 app: my-service 44 ports: 45 - name: tcp-fake 46 protocol: TCP 47 port: 8080 48 targetPort: 8080 49 --- 50 # Service is mixed type, should generate warning. 51 apiVersion: v1 52 kind: Service 53 metadata: 54 name: mixed-type 55 namespace: my-namespace 56 spec: 57 type: LoadBalancer 58 selector: 59 app: my-service 60 ports: 61 - name: tcp-foo 62 protocol: TCP 63 port: 8080 64 targetPort: 8080 65 --- 66 # Service is mixed mode(clusterIP and headless), should generate warning. 67 apiVersion: v1 68 kind: Service 69 metadata: 70 name: mixed-mode 71 namespace: my-namespace 72 spec: 73 clusterIP: None 74 selector: 75 app: my-service 76 ports: 77 - name: tcp-foo 78 protocol: TCP 79 port: 8080 80 targetPort: 8080 81 --- 82 # Service is mixed with port protocols, should generate warning. 83 apiVersion: v1 84 kind: Service 85 metadata: 86 name: mixed-port-protocol 87 namespace: my-namespace 88 spec: 89 type: ClusterIP 90 selector: 91 app: my-service 92 ports: 93 - name: http 94 protocol: TCP 95 port: 8080 96 targetPort: 8080