istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/service-no-port-name-system-namespace.yaml (about) 1 # If port is unnamed or port name doesn't follow <protocol>[-<suffix>], the analyzer will report warning. 2 # If the service is in system namespace, i.e., kube-system, istio-system, kube-public, the check will be skipped. 3 apiVersion: v1 4 kind: Service 5 metadata: 6 name: my-service1 7 namespace: kube-system # Skipped because it's in a kube system namespace 8 spec: 9 selector: 10 app: my-service1 11 ports: 12 - protocol: TCP 13 port: 8080 14 targetPort: 8080 15 - protocol: TCP 16 port: 8081 17 targetPort: 8081 18 --- 19 apiVersion: v1 20 kind: Service 21 metadata: 22 name: my-service2 # Skipped because it has an istio: label 23 namespace: istio-system 24 labels: 25 istio: xxx 26 spec: 27 selector: 28 app: my-service2 29 ports: 30 - name: foo 31 protocol: TCP 32 port: 8080 33 targetPort: 8080 34 --- 35 apiVersion: v1 36 kind: Service 37 metadata: 38 name: my-service3 # Skipped because it's in a kube system namespace 39 namespace: kube-public 40 spec: 41 selector: 42 app: my-service3 43 ports: 44 - name: bar 45 protocol: TCP 46 port: 8080 47 targetPort: 8080 48 --- 49 apiVersion: v1 50 kind: Service 51 metadata: 52 name: my-service4 # Skipped because of the release:istio label 53 namespace: istio-system 54 labels: 55 release: istio 56 spec: 57 selector: 58 app: my-service4 59 ports: 60 - name: foo 61 protocol: TCP 62 port: 8080 63 targetPort: 8080