istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/tcp-echo/tcp-echo-services.yaml (about)

     1  # Copyright 2018 Istio Authors
     2  #
     3  #   Licensed under the Apache License, Version 2.0 (the "License");
     4  #   you may not use this file except in compliance with the License.
     5  #   You may obtain a copy of the License at
     6  #
     7  #       http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  #   Unless required by applicable law or agreed to in writing, software
    10  #   distributed under the License is distributed on an "AS IS" BASIS,
    11  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  #   See the License for the specific language governing permissions and
    13  #   limitations under the License.
    14  
    15  apiVersion: v1
    16  kind: Service
    17  metadata:
    18    name: tcp-echo
    19    labels:
    20      app: tcp-echo
    21      service: tcp-echo
    22  spec:
    23    ports:
    24    - name: tcp
    25      port: 9000
    26    - name: tcp-other
    27      port: 9001
    28    # Port 9002 is omitted intentionally for testing the pass through filter chain.
    29    selector:
    30      app: tcp-echo
    31  ---
    32  apiVersion: apps/v1
    33  kind: Deployment
    34  metadata:
    35    name: tcp-echo-v1
    36    labels:
    37      app: tcp-echo
    38      version: v1
    39  spec:
    40    replicas: 1
    41    selector:
    42      matchLabels:
    43        app: tcp-echo
    44        version: v1
    45    template:
    46      metadata:
    47        labels:
    48          app: tcp-echo
    49          version: v1
    50      spec:
    51        containers:
    52        - name: tcp-echo
    53          image: docker.io/istio/tcp-echo-server:1.3
    54          imagePullPolicy: IfNotPresent
    55          args: [ "9000,9001,9002", "one" ]
    56          ports:
    57          - containerPort: 9000
    58          - containerPort: 9001
    59  ---
    60  apiVersion: apps/v1
    61  kind: Deployment
    62  metadata:
    63    name: tcp-echo-v2
    64    labels:
    65      app: tcp-echo
    66      version: v2
    67  spec:
    68    replicas: 1
    69    selector:
    70      matchLabels:
    71        app: tcp-echo
    72        version: v2
    73    template:
    74      metadata:
    75        labels:
    76          app: tcp-echo
    77          version: v2
    78      spec:
    79        containers:
    80        - name: tcp-echo
    81          image: docker.io/istio/tcp-echo-server:1.3
    82          imagePullPolicy: IfNotPresent
    83          args: [ "9000,9001,9002", "two" ]
    84          ports:
    85          - containerPort: 9000
    86          - containerPort: 9001