istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/bookinfo/platform/kube/bookinfo-ratings-v2-mysql.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 19 labels: 20 app: ratings 21 version: v2-mysql 22 spec: 23 replicas: 1 24 selector: 25 matchLabels: 26 app: ratings 27 version: v2-mysql 28 template: 29 metadata: 30 labels: 31 app: ratings 32 version: v2-mysql 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 # ratings-v2 will use mongodb as the default db backend. 40 # if you would like to use mysqldb then you can use this file 41 # which sets DB_TYPE = 'mysql' and the rest of the parameters shown 42 # here and also create the # mysqldb service using bookinfo-mysql.yaml 43 # NOTE: This file is mutually exclusive to bookinfo-ratings-v2.yaml 44 - name: DB_TYPE 45 value: "mysql" 46 - name: MYSQL_DB_HOST 47 value: mysqldb 48 - name: MYSQL_DB_PORT 49 value: "3306" 50 - name: MYSQL_DB_USER 51 value: root 52 - name: MYSQL_DB_PASSWORD 53 value: password 54 ports: 55 - containerPort: 9080 56 ---