istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/bookinfo/platform/kube/bookinfo-db.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  apiVersion: v1
    16  kind: Service
    17  metadata:
    18    name: mongodb
    19    labels:
    20      app: mongodb
    21      service: mongodb
    22  spec:
    23    ports:
    24    - port: 27017
    25      name: mongo
    26    selector:
    27      app: mongodb
    28  ---
    29  apiVersion: apps/v1
    30  kind: Deployment
    31  metadata:
    32    name: mongodb-v1
    33    labels:
    34      app: mongodb
    35      version: v1
    36  spec:
    37    replicas: 1
    38    selector:
    39      matchLabels:
    40        app: mongodb
    41        version: v1
    42    template:
    43      metadata:
    44        labels:
    45          app: mongodb
    46          version: v1
    47      spec:
    48        containers:
    49        - name: mongodb 
    50          image: docker.io/istio/examples-bookinfo-mongodb:1.19.1
    51          imagePullPolicy: IfNotPresent
    52          ports:
    53          - containerPort: 27017
    54          volumeMounts:
    55          - name: data-db
    56            mountPath: /data/db
    57        volumes:
    58        - name: data-db
    59          emptyDir: {}
    60  ---