istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/service-no-port-name.yaml (about)

     1  # If port is unnamed or port name doesn't follow <protocol>[-<suffix>], the analyzer will report warning.
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: my-service1
     6    namespace: my-namespace1
     7  spec:
     8    selector:
     9      app: my-service1
    10    ports:
    11      - protocol: TCP
    12        port: 8080
    13        targetPort: 8080
    14      - protocol: TCP
    15        port: 8081
    16        targetPort: 8081
    17  ---
    18  apiVersion: v1
    19  kind: Service
    20  metadata:
    21    name: my-service2
    22    namespace: my-namespace2
    23  spec:
    24    selector:
    25      app: my-service2
    26    ports:
    27      - name: foo
    28        protocol: TCP
    29        port: 8080
    30        targetPort: 8080