| # Copyright Istio Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| apiVersion: v1 |
| kind: ServiceAccount |
| metadata: |
| name: bookinfo-ratings-v2 |
| --- |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| name: ratings-v2 |
| labels: |
| app: ratings |
| version: v2 |
| spec: |
| replicas: 1 |
| selector: |
| matchLabels: |
| app: ratings |
| version: v2 |
| template: |
| metadata: |
| labels: |
| app: ratings |
| version: v2 |
| spec: |
| serviceAccountName: bookinfo-ratings-v2 |
| containers: |
| - name: ratings |
| image: docker.io/istio/examples-bookinfo-ratings-v2:1.16.4 |
| imagePullPolicy: IfNotPresent |
| env: |
| # ratings-v2 will use mongodb as the default db backend. |
| # if you would like to use mysqldb then set DB_TYPE = 'mysql', set |
| # the rest of the parameters shown here and also create the |
| # mysqldb service using bookinfo-mysql.yaml |
| # - name: DB_TYPE #default to |
| # value: "mysql" |
| # - name: MYSQL_DB_HOST |
| # value: mysqldb |
| # - name: MYSQL_DB_PORT |
| # value: "3306" |
| # - name: MYSQL_DB_USER |
| # value: root |
| # - name: MYSQL_DB_PASSWORD |
| # value: password |
| - name: MONGO_DB_URL |
| value: mongodb://mongodb:27017/test |
| ports: |
| - containerPort: 9080 |
| securityContext: |
| runAsUser: 1000 |
| --- |