From 1cf75d5902625dd12369c3351d52bceab9c202d1 Mon Sep 17 00:00:00 2001 From: savagebidoof Date: Sat, 14 Oct 2023 12:21:42 +0200 Subject: [PATCH] Deglossed the files. --- .../{deployment.yaml => Deployment.yaml} | 20 ----- .../05-TCP-FORWARDING/Gateway.yaml | 20 +++++ .../05-TCP-FORWARDING/Service.yaml | 19 +++++ .../{gateway.yaml => VirtualService.yaml} | 21 ------ .../06-TLS-PASSTHROUGH/Deployment.yaml | 26 +++++++ .../06-TLS-PASSTHROUGH/Gateway.yaml | 17 +++++ .../06-TLS-PASSTHROUGH/Service.yaml | 16 ++++ .../{gateway.yaml => VirtualService.yaml} | 18 ----- .../06-TLS-PASSTHROUGH/deployment.yaml | 73 ------------------- 9 files changed, 98 insertions(+), 132 deletions(-) rename 03-Gateway_Ingress/05-TCP-FORWARDING/{deployment.yaml => Deployment.yaml} (62%) create mode 100755 03-Gateway_Ingress/05-TCP-FORWARDING/Gateway.yaml create mode 100644 03-Gateway_Ingress/05-TCP-FORWARDING/Service.yaml rename 03-Gateway_Ingress/05-TCP-FORWARDING/{gateway.yaml => VirtualService.yaml} (58%) mode change 100755 => 100644 create mode 100755 03-Gateway_Ingress/06-TLS-PASSTHROUGH/Deployment.yaml create mode 100755 03-Gateway_Ingress/06-TLS-PASSTHROUGH/Gateway.yaml create mode 100644 03-Gateway_Ingress/06-TLS-PASSTHROUGH/Service.yaml rename 03-Gateway_Ingress/06-TLS-PASSTHROUGH/{gateway.yaml => VirtualService.yaml} (55%) mode change 100755 => 100644 delete mode 100755 03-Gateway_Ingress/06-TLS-PASSTHROUGH/deployment.yaml diff --git a/03-Gateway_Ingress/05-TCP-FORWARDING/deployment.yaml b/03-Gateway_Ingress/05-TCP-FORWARDING/Deployment.yaml similarity index 62% rename from 03-Gateway_Ingress/05-TCP-FORWARDING/deployment.yaml rename to 03-Gateway_Ingress/05-TCP-FORWARDING/Deployment.yaml index 92c59bd..5e7af48 100755 --- a/03-Gateway_Ingress/05-TCP-FORWARDING/deployment.yaml +++ b/03-Gateway_Ingress/05-TCP-FORWARDING/Deployment.yaml @@ -1,23 +1,3 @@ -apiVersion: v1 -kind: Service -metadata: - name: helloworld - labels: - app: helloworld - service: helloworld -spec: - ports: - - port: 8080 - name: http-web - targetPort: 80 - protocol: TCP - - port: 8443 - name: https-web - targetPort: 443 - protocol: TCP - selector: - app: helloworld ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/03-Gateway_Ingress/05-TCP-FORWARDING/Gateway.yaml b/03-Gateway_Ingress/05-TCP-FORWARDING/Gateway.yaml new file mode 100755 index 0000000..f7e0c2b --- /dev/null +++ b/03-Gateway_Ingress/05-TCP-FORWARDING/Gateway.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: helloworld-gateway +spec: + selector: + istio: ingressgateway + servers: + - port: + number: 80 + name: tcp-1 + protocol: TCP + hosts: + - "*" + - port: + number: 443 + name: tcp-2 + protocol: TCP + hosts: + - "*" \ No newline at end of file diff --git a/03-Gateway_Ingress/05-TCP-FORWARDING/Service.yaml b/03-Gateway_Ingress/05-TCP-FORWARDING/Service.yaml new file mode 100644 index 0000000..81cb088 --- /dev/null +++ b/03-Gateway_Ingress/05-TCP-FORWARDING/Service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: helloworld + labels: + app: helloworld + service: helloworld +spec: + ports: + - port: 8080 + name: http-web + targetPort: 80 + protocol: TCP + - port: 8443 + name: https-web + targetPort: 443 + protocol: TCP + selector: + app: helloworld \ No newline at end of file diff --git a/03-Gateway_Ingress/05-TCP-FORWARDING/gateway.yaml b/03-Gateway_Ingress/05-TCP-FORWARDING/VirtualService.yaml old mode 100755 new mode 100644 similarity index 58% rename from 03-Gateway_Ingress/05-TCP-FORWARDING/gateway.yaml rename to 03-Gateway_Ingress/05-TCP-FORWARDING/VirtualService.yaml index 036596c..79b0c48 --- a/03-Gateway_Ingress/05-TCP-FORWARDING/gateway.yaml +++ b/03-Gateway_Ingress/05-TCP-FORWARDING/VirtualService.yaml @@ -1,25 +1,4 @@ apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: helloworld-gateway -spec: - selector: - istio: ingressgateway - servers: - - port: - number: 80 - name: tcp-1 - protocol: TCP - hosts: - - "*" - - port: - number: 443 - name: tcp-2 - protocol: TCP - hosts: - - "*" ---- -apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: helloworld-vs diff --git a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Deployment.yaml b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Deployment.yaml new file mode 100755 index 0000000..700f9cb --- /dev/null +++ b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Deployment.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: helloworld-nginx + labels: + app: helloworld +spec: + replicas: 1 + selector: + matchLabels: + app: helloworld + template: + metadata: + labels: + app: helloworld + spec: + containers: + - name: helloworld + image: oriolfilter/https-nginx-demo + resources: + requests: + cpu: "100m" + imagePullPolicy: Always #Always + ports: + - containerPort: 80 + - containerPort: 443 \ No newline at end of file diff --git a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Gateway.yaml b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Gateway.yaml new file mode 100755 index 0000000..e4cf71f --- /dev/null +++ b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Gateway.yaml @@ -0,0 +1,17 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: helloworld-gateway + namespace: default +spec: + selector: + istio: ingressgateway + servers: + - port: + number: 443 + name: https-web + protocol: HTTPS + hosts: + - "*" + tls: + mode: PASSTHROUGH diff --git a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Service.yaml b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Service.yaml new file mode 100644 index 0000000..5f48363 --- /dev/null +++ b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/Service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: helloworld + labels: + app: helloworld + service: helloworld +spec: + ports: + - name: https + port: 8443 + targetPort: 443 + protocol: TCP + appProtocol: HTTPS + selector: + app: helloworld \ No newline at end of file diff --git a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/gateway.yaml b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/VirtualService.yaml old mode 100755 new mode 100644 similarity index 55% rename from 03-Gateway_Ingress/06-TLS-PASSTHROUGH/gateway.yaml rename to 03-Gateway_Ingress/06-TLS-PASSTHROUGH/VirtualService.yaml index 2f092f6..fd451f8 --- a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/gateway.yaml +++ b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/VirtualService.yaml @@ -1,22 +1,4 @@ apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: helloworld-gateway - namespace: default -spec: - selector: - istio: ingressgateway - servers: - - port: - number: 443 - name: https-web - protocol: HTTPS - hosts: - - "*" - tls: - mode: PASSTHROUGH ---- -apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: helloworld-vs diff --git a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/deployment.yaml b/03-Gateway_Ingress/06-TLS-PASSTHROUGH/deployment.yaml deleted file mode 100755 index f94f650..0000000 --- a/03-Gateway_Ingress/06-TLS-PASSTHROUGH/deployment.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: helloworld - labels: - app: helloworld - service: helloworld -spec: - ports: - - name: https - port: 8443 - targetPort: 443 - protocol: TCP - appProtocol: HTTPS - selector: - app: helloworld ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: helloworld-nginx - labels: - app: helloworld -spec: - replicas: 1 - selector: - matchLabels: - app: helloworld - template: - metadata: - labels: - app: helloworld - spec: - containers: - - name: helloworld - image: oriolfilter/https-nginx-demo - resources: - requests: - cpu: "100m" - imagePullPolicy: Always #Always - ports: - - containerPort: 80 - - containerPort: 443 -#--- -#apiVersion: apps/v1 -#kind: Deployment -#metadata: -# name: nginx -# labels: -# app: nginx -# version: v1 -#spec: -# replicas: 1 -# selector: -# matchLabels: -# app: nginx -# version: v1 -# template: -# metadata: -# labels: -# app: nginx -# version: v1 -# spec: -# # serviceAccountName: istio-helloworld -# containers: -# - name: nginx -# image: nginx -# resources: -# requests: -# cpu: "100m" -# imagePullPolicy: IfNotPresent -# ports: -# - containerPort: 80 \ No newline at end of file