From 8b44410a94e630780b501c9708a2e901a96e4199 Mon Sep 17 00:00:00 2001 From: adjoly Date: Wed, 27 Aug 2025 20:19:01 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=8F=97=EF=B8=8F=E3=80=8D=20wip:?= =?UTF-8?q?=20should=20be=20working=20but=20pull=20limit=20is=20off=20for?= =?UTF-8?q?=20today?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- p2/deploy/app-ingress.yml | 36 +++++++++++++++++++ p2/deploy/{ => app1}/app1-deployment.yml | 2 +- p2/deploy/app1/app1-service.yml | 11 ++++++ .../{app2.yml => app2/app2-deployment.yml} | 15 ++++---- p2/deploy/app2/app2-service.yml | 11 ++++++ p2/deploy/app3/app3-deployment.yml | 21 +++++++++++ p2/deploy/app3/app3-service.yml | 11 ++++++ 7 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 p2/deploy/app-ingress.yml rename p2/deploy/{ => app1}/app1-deployment.yml (90%) create mode 100644 p2/deploy/app1/app1-service.yml rename p2/deploy/{app2.yml => app2/app2-deployment.yml} (54%) create mode 100644 p2/deploy/app2/app2-service.yml create mode 100644 p2/deploy/app3/app3-deployment.yml create mode 100644 p2/deploy/app3/app3-service.yml diff --git a/p2/deploy/app-ingress.yml b/p2/deploy/app-ingress.yml new file mode 100644 index 0000000..dc33459 --- /dev/null +++ b/p2/deploy/app-ingress.yml @@ -0,0 +1,36 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: app-ingress +spec: + rules: + - host: app1.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: app1-service + port: + number: 80 + - host: app2.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: app2-service + port: + number: 80 + - host: app3.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: app3-service + port: + number: 80 diff --git a/p2/deploy/app1-deployment.yml b/p2/deploy/app1/app1-deployment.yml similarity index 90% rename from p2/deploy/app1-deployment.yml rename to p2/deploy/app1/app1-deployment.yml index 4aaed93..5fcaa2c 100644 --- a/p2/deploy/app1-deployment.yml +++ b/p2/deploy/app1/app1-deployment.yml @@ -13,7 +13,7 @@ spec: spec: containers: - name: app1 - image: traefik/whoami + image: traefik/whoami:v1.11 ports: - containerPort: 80 command: diff --git a/p2/deploy/app1/app1-service.yml b/p2/deploy/app1/app1-service.yml new file mode 100644 index 0000000..b6053ca --- /dev/null +++ b/p2/deploy/app1/app1-service.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: app1-service +spec: + type: ClusterIP + selector: + app: app1 + ports: + - port: 80 + targetPort: 80 diff --git a/p2/deploy/app2.yml b/p2/deploy/app2/app2-deployment.yml similarity index 54% rename from p2/deploy/app2.yml rename to p2/deploy/app2/app2-deployment.yml index e2f1c21..4ae74ac 100644 --- a/p2/deploy/app2.yml +++ b/p2/deploy/app2/app2-deployment.yml @@ -1,21 +1,22 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: app1-deployment - labels: - app: app1 + name: app2-deployment spec: replicas: 3 selector: matchLabels: - app: nginx + app: app2 template: metadata: labels: - app: nginx + app: app2 spec: containers: - - name: nginx - image: nginx:1.14.2 + - name: app2 + image: traefik/whoami ports: - containerPort: 80 + command: + - --port=80 + - --name=app-two diff --git a/p2/deploy/app2/app2-service.yml b/p2/deploy/app2/app2-service.yml new file mode 100644 index 0000000..18ec0da --- /dev/null +++ b/p2/deploy/app2/app2-service.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: app2-service +spec: + selector: + matchLabels: + app: app2 + ports: + port: 80 + tragetPort: 80 diff --git a/p2/deploy/app3/app3-deployment.yml b/p2/deploy/app3/app3-deployment.yml new file mode 100644 index 0000000..1e3d570 --- /dev/null +++ b/p2/deploy/app3/app3-deployment.yml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app3-deployment +spec: + selector: + matchLabels: + app: app3 + template: + metadata: + labels: + app: app3 + spec: + containers: + - name: app3 + image: traefik/whoami + ports: + - containerPort: 80 + command: + - --port=80 + - --name=app-three diff --git a/p2/deploy/app3/app3-service.yml b/p2/deploy/app3/app3-service.yml new file mode 100644 index 0000000..78b26de --- /dev/null +++ b/p2/deploy/app3/app3-service.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: app3-service +spec: + selector: + matchLabels: + app: app3 + ports: + port: 80 + tragetPort: 80