From 83059ac84ec3efc253c815a0153bc9a636d8e4ca Mon Sep 17 00:00:00 2001 From: Abdulla Faraz Date: Sat, 8 Feb 2025 23:47:04 +0530 Subject: [PATCH] adding deployment manifests --- deployments/api-manifest.yaml | 55 +++++++++++++++++++++++++++++++++++ deployments/web-manifest.yaml | 44 ++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 deployments/api-manifest.yaml create mode 100644 deployments/web-manifest.yaml diff --git a/deployments/api-manifest.yaml b/deployments/api-manifest.yaml new file mode 100644 index 0000000..8d31ec2 --- /dev/null +++ b/deployments/api-manifest.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: api-deployment + labels: + app: api-deployment +spec: + selector: + matchLabels: + app: api-app + replicas: 1 + template: + metadata: + labels: + app: api-app + spec: + containers: + - name: api + image: n3m6/api:latest + imagePullPolicy: Always + ports: + - containerPort: 80 + resources: + limits: + cpu: 500m + memory: 500Mi + env: + - name: SERVICE_API_PORT + valueFrom: + secretKeyRef: + name: deploy-config + key: SERVICE_API_PORT + - name: SERVICE_API_JWT_SECRET_KEY + valueFrom: + secretKeyRef: + name: deploy-config + key: SERVICE_API_JWT_SECRET_KEY + restartPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: api-service + labels: + app: api-service +spec: + selector: + app: api-app + type: LoadBalancer + ipFamilies: + - IPv4 + ports: + - protocol: TCP + port: 80 + targetPort: 3000 \ No newline at end of file diff --git a/deployments/web-manifest.yaml b/deployments/web-manifest.yaml new file mode 100644 index 0000000..f88533b --- /dev/null +++ b/deployments/web-manifest.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web-deployment + labels: + app: web-deployment +spec: + selector: + matchLabels: + app: web-app + replicas: 1 + template: + metadata: + labels: + app: web-app + spec: + containers: + - name: web + image: n3m6/web:latest + imagePullPolicy: Always + ports: + - containerPort: 80 + resources: + limits: + cpu: 500m + memory: 500Mi + restartPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: web-service + labels: + app: web-service +spec: + selector: + app: web-app + type: LoadBalancer + ipFamilies: + - IPv4 + ports: + - protocol: TCP + port: 80 + targetPort: 80 \ No newline at end of file