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