From 20d69656fd6bb46b27d5ca54463c747b0fa59b30 Mon Sep 17 00:00:00 2001 From: savagebidoof Date: Thu, 27 Apr 2023 03:26:39 +0200 Subject: [PATCH] Added example about targeting deployments through the use of selectors (targeting labels) --- .../03-target-deployments/deployment_2.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml diff --git a/Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml b/Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml new file mode 100755 index 0000000..69a8412 --- /dev/null +++ b/Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml @@ -0,0 +1,42 @@ +apiVersion: v1 +kind: Service +metadata: + name: byeworld + labels: + app: byeworld + service: byeworld + namespace: foo +spec: + ports: + - port: 9090 + name: http + targetPort: 80 + selector: + app: byeworld +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: byeworld-nginx + labels: + app: byeworld + namespace: foo +spec: + replicas: 1 + selector: + matchLabels: + app: byeworld + template: + metadata: + labels: + app: byeworld + spec: + containers: + - name: byeworld + image: nginx + resources: + requests: + cpu: "100m" + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80