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

     1  # Copyright 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  ################################################################################
    16  # tcp-echo service
    17  ################################################################################
    18  apiVersion: v1
    19  kind: Service
    20  metadata:
    21    name: tcp-echo
    22    labels:
    23      app: tcp-echo
    24      service: tcp-echo
    25  spec:
    26    ipFamilyPolicy: SingleStack
    27    ipFamilies:
    28    - IPv4
    29    ports:
    30    - name: tcp
    31      port: 9000
    32    - name: tcp-other
    33      port: 9001
    34    # Port 9002 is omitted intentionally for testing the pass through filter chain.
    35    selector:
    36      app: tcp-echo
    37  ---
    38  apiVersion: apps/v1
    39  kind: Deployment
    40  metadata:
    41    name: tcp-echo
    42  spec:
    43    replicas: 1
    44    selector:
    45      matchLabels:
    46        app: tcp-echo
    47        version: v1
    48    template:
    49      metadata:
    50        labels:
    51          app: tcp-echo
    52          version: v1
    53      spec:
    54        containers:
    55        - name: tcp-echo
    56          image: docker.io/istio/tcp-echo-server:1.3
    57          imagePullPolicy: Always
    58          args: [ "9000,9001,9002", "hello" ]
    59          ports:
    60          - containerPort: 9000
    61          - containerPort: 9001