From 5bd7fd943b7f34e2e800b3318f2ffb6f7ebce76d Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Thu, 2 Nov 2023 12:43:29 +0530 Subject: [PATCH 1/3] Folder structuring Done for better maintainability. --- .../ingress-srv.yaml => ingress-nginx/dev/dev-ingress-srv.yaml} | 0 .../ingress-srv.yaml => ingress-nginx/prod/prod-ingress-srv.yaml} | 0 infra/{k8s => statefull}/auth-mongo-depl.yaml | 0 infra/{k8s => statefull}/expiration-redis-depl.yaml | 0 infra/{k8s => statefull}/nats-depl.yaml | 0 infra/{k8s => statefull}/orders-mongo-depl.yaml | 0 infra/{k8s => statefull}/payments-mongo-depl.yaml | 0 infra/{k8s => statefull}/tickets-mongo-depl.yaml | 0 infra/{k8s => stateless}/auth-depl.yaml | 0 infra/{k8s => stateless}/client-depl.yaml | 0 infra/{k8s => stateless}/expiration-depl.yaml | 0 infra/{k8s => stateless}/orders-depl.yaml | 0 infra/{k8s => stateless}/payments-depl.yaml | 0 infra/{k8s => stateless}/tickets-depl.yaml | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename infra/{k8s-dev/ingress-srv.yaml => ingress-nginx/dev/dev-ingress-srv.yaml} (100%) rename infra/{k8s-prod/ingress-srv.yaml => ingress-nginx/prod/prod-ingress-srv.yaml} (100%) rename infra/{k8s => statefull}/auth-mongo-depl.yaml (100%) rename infra/{k8s => statefull}/expiration-redis-depl.yaml (100%) rename infra/{k8s => statefull}/nats-depl.yaml (100%) rename infra/{k8s => statefull}/orders-mongo-depl.yaml (100%) rename infra/{k8s => statefull}/payments-mongo-depl.yaml (100%) rename infra/{k8s => statefull}/tickets-mongo-depl.yaml (100%) rename infra/{k8s => stateless}/auth-depl.yaml (100%) rename infra/{k8s => stateless}/client-depl.yaml (100%) rename infra/{k8s => stateless}/expiration-depl.yaml (100%) rename infra/{k8s => stateless}/orders-depl.yaml (100%) rename infra/{k8s => stateless}/payments-depl.yaml (100%) rename infra/{k8s => stateless}/tickets-depl.yaml (100%) diff --git a/infra/k8s-dev/ingress-srv.yaml b/infra/ingress-nginx/dev/dev-ingress-srv.yaml similarity index 100% rename from infra/k8s-dev/ingress-srv.yaml rename to infra/ingress-nginx/dev/dev-ingress-srv.yaml diff --git a/infra/k8s-prod/ingress-srv.yaml b/infra/ingress-nginx/prod/prod-ingress-srv.yaml similarity index 100% rename from infra/k8s-prod/ingress-srv.yaml rename to infra/ingress-nginx/prod/prod-ingress-srv.yaml diff --git a/infra/k8s/auth-mongo-depl.yaml b/infra/statefull/auth-mongo-depl.yaml similarity index 100% rename from infra/k8s/auth-mongo-depl.yaml rename to infra/statefull/auth-mongo-depl.yaml diff --git a/infra/k8s/expiration-redis-depl.yaml b/infra/statefull/expiration-redis-depl.yaml similarity index 100% rename from infra/k8s/expiration-redis-depl.yaml rename to infra/statefull/expiration-redis-depl.yaml diff --git a/infra/k8s/nats-depl.yaml b/infra/statefull/nats-depl.yaml similarity index 100% rename from infra/k8s/nats-depl.yaml rename to infra/statefull/nats-depl.yaml diff --git a/infra/k8s/orders-mongo-depl.yaml b/infra/statefull/orders-mongo-depl.yaml similarity index 100% rename from infra/k8s/orders-mongo-depl.yaml rename to infra/statefull/orders-mongo-depl.yaml diff --git a/infra/k8s/payments-mongo-depl.yaml b/infra/statefull/payments-mongo-depl.yaml similarity index 100% rename from infra/k8s/payments-mongo-depl.yaml rename to infra/statefull/payments-mongo-depl.yaml diff --git a/infra/k8s/tickets-mongo-depl.yaml b/infra/statefull/tickets-mongo-depl.yaml similarity index 100% rename from infra/k8s/tickets-mongo-depl.yaml rename to infra/statefull/tickets-mongo-depl.yaml diff --git a/infra/k8s/auth-depl.yaml b/infra/stateless/auth-depl.yaml similarity index 100% rename from infra/k8s/auth-depl.yaml rename to infra/stateless/auth-depl.yaml diff --git a/infra/k8s/client-depl.yaml b/infra/stateless/client-depl.yaml similarity index 100% rename from infra/k8s/client-depl.yaml rename to infra/stateless/client-depl.yaml diff --git a/infra/k8s/expiration-depl.yaml b/infra/stateless/expiration-depl.yaml similarity index 100% rename from infra/k8s/expiration-depl.yaml rename to infra/stateless/expiration-depl.yaml diff --git a/infra/k8s/orders-depl.yaml b/infra/stateless/orders-depl.yaml similarity index 100% rename from infra/k8s/orders-depl.yaml rename to infra/stateless/orders-depl.yaml diff --git a/infra/k8s/payments-depl.yaml b/infra/stateless/payments-depl.yaml similarity index 100% rename from infra/k8s/payments-depl.yaml rename to infra/stateless/payments-depl.yaml diff --git a/infra/k8s/tickets-depl.yaml b/infra/stateless/tickets-depl.yaml similarity index 100% rename from infra/k8s/tickets-depl.yaml rename to infra/stateless/tickets-depl.yaml From bc6dad0464a012d47cdfaae9bf458f383e03b15f Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Thu, 2 Nov 2023 12:54:30 +0530 Subject: [PATCH 2/3] Updated skaffold config with modified directory paths. --- skaffold.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skaffold.yaml b/skaffold.yaml index 4c6dab9..9ec6f29 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -3,8 +3,9 @@ kind: Config deploy: kubectl: manifests: - - ./infra/k8s/* - - ./infra/k8s-dev/* + - ./infra/ingress-nginx/dev/* + - ./infra/statefull/* + - ./infra/stateless/* build: local: push: true From d783abecf618efd941a167df209cab1ee935dca3 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Thu, 2 Nov 2023 13:06:13 +0530 Subject: [PATCH 3/3] Modified to accommodate changes made to infra directory. --- .github/workflows/CD - Deploy - Manifests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD - Deploy - Manifests.yml b/.github/workflows/CD - Deploy - Manifests.yml index d3af011..217db34 100644 --- a/.github/workflows/CD - Deploy - Manifests.yml +++ b/.github/workflows/CD - Deploy - Manifests.yml @@ -19,4 +19,4 @@ jobs: with: token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} - - run: kubectl apply -f infra/k8s && kubectl apply -f infra/k8s-prod + - run: kubectl apply -f infra/ingress-nginx/prod && kubectl apply -f infra/statefull && kubectl apply -f infra/stateless