istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/sleep/sleep.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  # Sleep service
    17  ##################################################################################################
    18  apiVersion: v1
    19  kind: ServiceAccount
    20  metadata:
    21    name: sleep
    22  ---
    23  apiVersion: v1
    24  kind: Service
    25  metadata:
    26    name: sleep
    27    labels:
    28      app: sleep
    29      service: sleep
    30  spec:
    31    ports:
    32    - port: 80
    33      name: http
    34    selector:
    35      app: sleep
    36  ---
    37  apiVersion: apps/v1
    38  kind: Deployment
    39  metadata:
    40    name: sleep
    41  spec:
    42    replicas: 1
    43    selector:
    44      matchLabels:
    45        app: sleep
    46    template:
    47      metadata:
    48        labels:
    49          app: sleep
    50      spec:
    51        terminationGracePeriodSeconds: 0
    52        serviceAccountName: sleep
    53        containers:
    54        - name: sleep
    55          image: curlimages/curl
    56          command: ["/bin/sleep", "infinity"]
    57          imagePullPolicy: IfNotPresent
    58          volumeMounts:
    59          - mountPath: /etc/sleep/tls
    60            name: secret-volume
    61        volumes:
    62        - name: secret-volume
    63          secret:
    64            secretName: sleep-secret
    65            optional: true
    66  ---