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