istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/bookinfo/platform/kube/bookinfo-ratings-v2-mysql-vm.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: apps/v1
    16  kind: Deployment
    17  metadata:
    18    name: ratings-v2-mysql-vm
    19    labels:
    20      app: ratings
    21      version: v2-mysql-vm
    22  spec:
    23    replicas: 1
    24    selector:
    25      matchLabels:
    26        app: ratings
    27        version: v2-mysql-vm
    28    template:
    29      metadata:
    30        labels:
    31          app: ratings
    32          version: v2-mysql-vm
    33      spec:
    34        containers:
    35        - name: ratings
    36          image: docker.io/istio/examples-bookinfo-ratings-v2:1.19.1
    37          imagePullPolicy: IfNotPresent
    38          env:
    39            # This assumes you registered your mysql vm as
    40            # istioctl register -n vm mysqldb 1.2.3.4 3306
    41            - name: DB_TYPE
    42              value: "mysql"
    43            - name: MYSQL_DB_HOST
    44              value: mysqldb.vm.svc.cluster.local
    45            - name: MYSQL_DB_PORT
    46              value: "3306"
    47            - name: MYSQL_DB_USER
    48              value: root
    49            - name: MYSQL_DB_PASSWORD
    50              value: password
    51          ports:
    52          - containerPort: 9080
    53  ---