From fdee127edcd3761bf8c98216aa70b903fd191f80 Mon Sep 17 00:00:00 2001 From: Alon Girmonsky <1990761+alongir@users.noreply.github.com> Date: Sat, 13 Jan 2024 15:50:24 -0800 Subject: [PATCH] Create tls-demo.yaml --- deploy/kubernetes/tls-demo.yaml | 130 ++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 deploy/kubernetes/tls-demo.yaml diff --git a/deploy/kubernetes/tls-demo.yaml b/deploy/kubernetes/tls-demo.yaml new file mode 100644 index 0000000..660b63f --- /dev/null +++ b/deploy/kubernetes/tls-demo.yaml @@ -0,0 +1,130 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: sock-shop +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mizutest-outbound-tls-openssl + labels: + name: mizutest-outbound-tls-openssl + namespace: sock-shop +spec: + replicas: 1 + selector: + matchLabels: + name: mizutest-outbound-tls-openssl + template: + metadata: + labels: + name: mizutest-outbound-tls-openssl + spec: + containers: + - name: mizutest-outbound-tls-openssl + image: mertyildiran/mizutest-outbound-tls-openssl:latest + env: + - name: PYTHONUNBUFFERED + value: "1" + - name: PYTHONIOENCODING + value: "UTF-8" + imagePullPolicy: Always + command: ["python3", "example.py"] + resources: + limits: + cpu: 50m + memory: 200Mi + requests: + cpu: 10m + memory: 10Mi + ports: + - containerPort: 80 + # securityContext: + # runAsNonRoot: true + # runAsUser: 10001 + # capabilities: + # drop: + # - all + # add: + # - NET_BIND_SERVICE + # readOnlyRootFilesystem: true + nodeSelector: + beta.kubernetes.io/os: linux +--- +apiVersion: v1 +kind: Service +metadata: + name: mizutest-outbound-tls-openssl + annotations: + prometheus.io/scrape: 'true' + labels: + name: mizutest-outbound-tls-openssl + namespace: sock-shop +spec: + ports: + # the port that this service should serve on + - port: 80 + targetPort: 80 + selector: + name: mizutest-outbound-tls-openssl +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mizutest-outbound-tls-golang + labels: + name: mizutest-outbound-tls-golang + namespace: sock-shop +spec: + replicas: 1 + selector: + matchLabels: + name: mizutest-outbound-tls-golang + template: + metadata: + labels: + name: mizutest-outbound-tls-golang + spec: + containers: + - name: mizutest-outbound-tls-golang + image: mertyildiran/mizutest-outbound-tls-golang:latest + imagePullPolicy: Always + command: ["./main"] + resources: + limits: + cpu: 50m + memory: 200Mi + requests: + cpu: 10m + memory: 10Mi + ports: + - containerPort: 80 + # securityContext: + # runAsNonRoot: true + # runAsUser: 10001 + # capabilities: + # drop: + # - all + # add: + # - NET_BIND_SERVICE + # readOnlyRootFilesystem: true + nodeSelector: + beta.kubernetes.io/os: linux +--- +apiVersion: v1 +kind: Service +metadata: + name: mizutest-outbound-tls-golang + annotations: + prometheus.io/scrape: 'true' + labels: + name: mizutest-outbound-tls-golang + namespace: sock-shop +spec: + ports: + # the port that this service should serve on + - port: 80 + targetPort: 80 + selector: + name: mizutest-outbound-tls-golang