istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/bookinfo/platform/kube/bookinfo.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 # This file defines the services, service accounts, and deployments for the Bookinfo sample. 17 # 18 # To apply all 4 Bookinfo services, their corresponding service accounts, and deployments: 19 # 20 # kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml 21 # 22 # Alternatively, you can deploy any resource separately: 23 # 24 # kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml -l service=reviews # reviews Service 25 # kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml -l account=reviews # reviews ServiceAccount 26 # kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml -l app=reviews,version=v3 # reviews-v3 Deployment 27 ################################################################################################## 28 29 ################################################################################################## 30 # Details service 31 ################################################################################################## 32 apiVersion: v1 33 kind: Service 34 metadata: 35 name: details 36 labels: 37 app: details 38 service: details 39 spec: 40 ports: 41 - port: 9080 42 name: http 43 selector: 44 app: details 45 --- 46 apiVersion: v1 47 kind: ServiceAccount 48 metadata: 49 name: bookinfo-details 50 labels: 51 account: details 52 --- 53 apiVersion: apps/v1 54 kind: Deployment 55 metadata: 56 name: details-v1 57 labels: 58 app: details 59 version: v1 60 spec: 61 replicas: 1 62 selector: 63 matchLabels: 64 app: details 65 version: v1 66 template: 67 metadata: 68 labels: 69 app: details 70 version: v1 71 spec: 72 serviceAccountName: bookinfo-details 73 containers: 74 - name: details 75 image: docker.io/istio/examples-bookinfo-details-v1:1.19.1 76 imagePullPolicy: IfNotPresent 77 ports: 78 - containerPort: 9080 79 --- 80 ################################################################################################## 81 # Ratings service 82 ################################################################################################## 83 apiVersion: v1 84 kind: Service 85 metadata: 86 name: ratings 87 labels: 88 app: ratings 89 service: ratings 90 spec: 91 ports: 92 - port: 9080 93 name: http 94 selector: 95 app: ratings 96 --- 97 apiVersion: v1 98 kind: ServiceAccount 99 metadata: 100 name: bookinfo-ratings 101 labels: 102 account: ratings 103 --- 104 apiVersion: apps/v1 105 kind: Deployment 106 metadata: 107 name: ratings-v1 108 labels: 109 app: ratings 110 version: v1 111 spec: 112 replicas: 1 113 selector: 114 matchLabels: 115 app: ratings 116 version: v1 117 template: 118 metadata: 119 labels: 120 app: ratings 121 version: v1 122 spec: 123 serviceAccountName: bookinfo-ratings 124 containers: 125 - name: ratings 126 image: docker.io/istio/examples-bookinfo-ratings-v1:1.19.1 127 imagePullPolicy: IfNotPresent 128 ports: 129 - containerPort: 9080 130 --- 131 ################################################################################################## 132 # Reviews service 133 ################################################################################################## 134 apiVersion: v1 135 kind: Service 136 metadata: 137 name: reviews 138 labels: 139 app: reviews 140 service: reviews 141 spec: 142 ports: 143 - port: 9080 144 name: http 145 selector: 146 app: reviews 147 --- 148 apiVersion: v1 149 kind: ServiceAccount 150 metadata: 151 name: bookinfo-reviews 152 labels: 153 account: reviews 154 --- 155 apiVersion: apps/v1 156 kind: Deployment 157 metadata: 158 name: reviews-v1 159 labels: 160 app: reviews 161 version: v1 162 spec: 163 replicas: 1 164 selector: 165 matchLabels: 166 app: reviews 167 version: v1 168 template: 169 metadata: 170 labels: 171 app: reviews 172 version: v1 173 spec: 174 serviceAccountName: bookinfo-reviews 175 containers: 176 - name: reviews 177 image: docker.io/istio/examples-bookinfo-reviews-v1:1.19.1 178 imagePullPolicy: IfNotPresent 179 env: 180 - name: LOG_DIR 181 value: "/tmp/logs" 182 ports: 183 - containerPort: 9080 184 volumeMounts: 185 - name: tmp 186 mountPath: /tmp 187 - name: wlp-output 188 mountPath: /opt/ibm/wlp/output 189 volumes: 190 - name: wlp-output 191 emptyDir: {} 192 - name: tmp 193 emptyDir: {} 194 --- 195 apiVersion: apps/v1 196 kind: Deployment 197 metadata: 198 name: reviews-v2 199 labels: 200 app: reviews 201 version: v2 202 spec: 203 replicas: 1 204 selector: 205 matchLabels: 206 app: reviews 207 version: v2 208 template: 209 metadata: 210 labels: 211 app: reviews 212 version: v2 213 spec: 214 serviceAccountName: bookinfo-reviews 215 containers: 216 - name: reviews 217 image: docker.io/istio/examples-bookinfo-reviews-v2:1.19.1 218 imagePullPolicy: IfNotPresent 219 env: 220 - name: LOG_DIR 221 value: "/tmp/logs" 222 ports: 223 - containerPort: 9080 224 volumeMounts: 225 - name: tmp 226 mountPath: /tmp 227 - name: wlp-output 228 mountPath: /opt/ibm/wlp/output 229 volumes: 230 - name: wlp-output 231 emptyDir: {} 232 - name: tmp 233 emptyDir: {} 234 --- 235 apiVersion: apps/v1 236 kind: Deployment 237 metadata: 238 name: reviews-v3 239 labels: 240 app: reviews 241 version: v3 242 spec: 243 replicas: 1 244 selector: 245 matchLabels: 246 app: reviews 247 version: v3 248 template: 249 metadata: 250 labels: 251 app: reviews 252 version: v3 253 spec: 254 serviceAccountName: bookinfo-reviews 255 containers: 256 - name: reviews 257 image: docker.io/istio/examples-bookinfo-reviews-v3:1.19.1 258 imagePullPolicy: IfNotPresent 259 env: 260 - name: LOG_DIR 261 value: "/tmp/logs" 262 ports: 263 - containerPort: 9080 264 volumeMounts: 265 - name: tmp 266 mountPath: /tmp 267 - name: wlp-output 268 mountPath: /opt/ibm/wlp/output 269 volumes: 270 - name: wlp-output 271 emptyDir: {} 272 - name: tmp 273 emptyDir: {} 274 --- 275 ################################################################################################## 276 # Productpage services 277 ################################################################################################## 278 apiVersion: v1 279 kind: Service 280 metadata: 281 name: productpage 282 labels: 283 app: productpage 284 service: productpage 285 spec: 286 ports: 287 - port: 9080 288 name: http 289 selector: 290 app: productpage 291 --- 292 apiVersion: v1 293 kind: ServiceAccount 294 metadata: 295 name: bookinfo-productpage 296 labels: 297 account: productpage 298 --- 299 apiVersion: apps/v1 300 kind: Deployment 301 metadata: 302 name: productpage-v1 303 labels: 304 app: productpage 305 version: v1 306 spec: 307 replicas: 1 308 selector: 309 matchLabels: 310 app: productpage 311 version: v1 312 template: 313 metadata: 314 annotations: 315 prometheus.io/scrape: "true" 316 prometheus.io/port: "9080" 317 prometheus.io/path: "/metrics" 318 labels: 319 app: productpage 320 version: v1 321 spec: 322 serviceAccountName: bookinfo-productpage 323 containers: 324 - name: productpage 325 image: docker.io/istio/examples-bookinfo-productpage-v1:1.19.1 326 imagePullPolicy: IfNotPresent 327 ports: 328 - containerPort: 9080 329 volumeMounts: 330 - name: tmp 331 mountPath: /tmp 332 volumes: 333 - name: tmp 334 emptyDir: {} 335 ---