From 545d96392282d907d6051c7c737d8ead71c72fb3 Mon Sep 17 00:00:00 2001 From: Vandeilson L Nobre Date: Thu, 4 Jul 2024 12:12:33 -0300 Subject: [PATCH 1/4] first deployment --- k8s/deployment.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..e69de29 From 6cf18a0254a22214dbba6d3befb2a01326b3a169 Mon Sep 17 00:00:00 2001 From: Vandeilson L Nobre Date: Thu, 4 Jul 2024 12:16:49 -0300 Subject: [PATCH 2/4] first deployment --- k8s/deployment.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index e69de29..93ce20a 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgre +spec: + replicas: 1 + selector: + matchLabels: + app: postgre + template: + metadata: + labels: + app: postgre + spec: + containers: + - name: postgre + image: postgres:13.1 + env: + - name: POSTGRES_PASSWORD + value: Passw0rd2024! + - name: POSTGRES_USER + value: reviewfilmes + - name: POSTGRES_DB + value: reviewfilmes + ports: + - containerPort: 5432 \ No newline at end of file From 163a365c35e55e5dad27a1887787b2590163d44d Mon Sep 17 00:00:00 2001 From: Vandeilson L Nobre Date: Thu, 4 Jul 2024 13:07:02 -0300 Subject: [PATCH 3/4] criado pod para application --- k8s/deployment.yaml | 56 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 93ce20a..f644f5c 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -1,3 +1,5 @@ +# Postgres Deployment + apiVersion: apps/v1 kind: Deployment metadata: @@ -23,4 +25,56 @@ spec: - name: POSTGRES_DB value: reviewfilmes ports: - - containerPort: 5432 \ No newline at end of file + - containerPort: 5432 +--- +# Service +apiVersion: v1 +kind: Service +metadata: + name: postgre +spec: + selector: + app: postgre + ports: + - port: 5432 +--- +# Application Deployment + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: reviewfilmes +spec: + replicas: 3 + selector: + matchLabels: + app: reviewfilmes + template: + metadata: + labels: + app: reviewfilmes + spec: + containers: + - name: reviewfilmes + image: vandeilsonln/review-filmes:v1 + env: + - name: ASPNETCORE_HTTP_PORTS + value: "8080" + - name: ConnectionStrings__DefaultConnection + value: "Host=postgre;Database=reviewfilmes;Username=reviewfilmes;Password=Passw0rd2024!" + ports: + - containerPort: 8080 +--- +# Service +apiVersion: v1 +kind: Service +metadata: + name: reviewfilmes +spec: + selector: + app: reviewfilmes + ports: + - port: 80 + targetPort: 8080 + nodePort: 30000 + type: NodePort \ No newline at end of file From 67223cdd6aa8e73a568ae06bca38f0d8dcdfcb3b Mon Sep 17 00:00:00 2001 From: Vandeilson L Nobre Date: Sat, 6 Jul 2024 13:18:43 -0300 Subject: [PATCH 4/4] changing to v2 --- k8s/deployment.yaml | 2 +- src/Review-Filmes.Web/Views/Shared/_Layout.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index f644f5c..0bfba9c 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -56,7 +56,7 @@ spec: spec: containers: - name: reviewfilmes - image: vandeilsonln/review-filmes:v1 + image: vandeilsonln/review-filmes:v2 env: - name: ASPNETCORE_HTTP_PORTS value: "8080" diff --git a/src/Review-Filmes.Web/Views/Shared/_Layout.cshtml b/src/Review-Filmes.Web/Views/Shared/_Layout.cshtml index 1de7af7..d33e659 100644 --- a/src/Review-Filmes.Web/Views/Shared/_Layout.cshtml +++ b/src/Review-Filmes.Web/Views/Shared/_Layout.cshtml @@ -30,7 +30,7 @@
-

Review de Vídeos

+

Review de Vídeos - V2

Review de Vídeos