github.com/fafucoder/cilium@v1.6.11/examples/kubernetes-istio/bookinfo-productpage-v2.yaml (about) 1 # Copyright 2017 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 # Productpage services 17 ################################################################################################## 18 apiVersion: cilium.io/v2 19 kind: CiliumNetworkPolicy 20 metadata: 21 name: productpage-v2 22 namespace: default 23 specs: 24 - endpointSelector: 25 matchLabels: 26 "k8s:app": productpage 27 "k8s:version": v2 28 ingress: 29 - toPorts: 30 - ports: 31 - port: "9080" 32 protocol: TCP 33 rules: 34 http: 35 - method: GET 36 path: "/" 37 - method: GET 38 path: "/index.html" 39 - method: POST 40 path: "/login" 41 - method: GET 42 path: "/logout" 43 - method: GET 44 path: "/productpage" 45 - method: GET 46 path: "/api/v1/products" 47 - method: GET 48 path: "/api/v1/products/[0-9]*" 49 --- 50 apiVersion: apps/v1 51 kind: Deployment 52 metadata: 53 name: productpage-v2 54 spec: 55 selector: 56 matchLabels: 57 app: productpage 58 version: v2 59 replicas: 1 60 template: 61 metadata: 62 annotations: 63 sidecar.istio.io/inject: "true" 64 labels: 65 app: productpage 66 version: v2 67 spec: 68 containers: 69 - name: productpage 70 image: docker.io/cilium/istio-examples-bookinfo-productpage-v2:0.3.0 71 imagePullPolicy: IfNotPresent 72 ports: 73 - containerPort: 9080 74 command: 75 - python 76 - productpage.py 77 - --kafka-bootstrap-server 78 - kafka:9092 79 - "9080"