github.com/fafucoder/cilium@v1.6.11/examples/kubernetes-istio/bookinfo-reviews-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 # Reviews service 17 ################################################################################################## 18 apiVersion: cilium.io/v2 19 kind: CiliumNetworkPolicy 20 metadata: 21 name: reviews-v2 22 namespace: default 23 specs: 24 - endpointSelector: 25 matchLabels: 26 "k8s:app": reviews 27 "k8s:version": v2 28 ingress: 29 - fromEndpoints: 30 - matchLabels: 31 "k8s:app": productpage 32 toPorts: 33 - ports: 34 - port: "9080" 35 protocol: TCP 36 rules: 37 http: 38 - method: GET 39 path: "/reviews/[0-9]*" 40 --- 41 apiVersion: apps/v1 42 kind: Deployment 43 metadata: 44 name: reviews-v2 45 spec: 46 selector: 47 matchLabels: 48 app: reviews 49 version: v2 50 replicas: 1 51 template: 52 metadata: 53 annotations: 54 sidecar.istio.io/inject: "true" 55 labels: 56 app: reviews 57 version: v2 58 spec: 59 containers: 60 - name: reviews 61 image: docker.io/istio/examples-bookinfo-reviews-v2:1.10.1 62 imagePullPolicy: IfNotPresent 63 ports: 64 - containerPort: 9080