Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s webhook config #39

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions k8s/api-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: snack-bar-api
namespace: snack-bar
spec:
replicas: 1
selector:
matchLabels:
app: snack-bar-api
template:
metadata:
labels:
app: snack-bar-api
spec:
containers:
- name: snack-bar-api
image: deborasilveira/snack-bar-api:latest
ports:
- containerPort: 3000
env:
- name: DATABASE_URL
value: 'postgresql://root:root@snack-bar-db:5432/snack-api-db'
resources:
requests:
cpu: 100m
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: payment-webhook-api
namespace: snack-bar
spec:
replicas: 1
selector:
matchLabels:
app: payment-webhook-api
template:
metadata:
labels:
app: payment-webhook-api
spec:
containers:
- name: payment-webhook-api
image: deborasilveira/payment-webhook-api:latest
ports:
- containerPort: 3001
env:
- name: MERCADO_PAGO_ACCESS_TOKEN
value: 'TEST-7418278903320835-072411-cef84b2f32a8952e205f8f50e3e20d15-391569826'
- name: MERCADO_PAGO_API_URL
value: 'https://api.mercadopago.com/v1'
resources:
requests:
cpu: 100m
25 changes: 25 additions & 0 deletions k8s/api-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: Service
metadata:
name: snack-bar-api
namespace: snack-bar
spec:
selector:
app: snack-bar-api
ports:
- port: 3000
targetPort: 3000
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
name: payment-webhook-api
namespace: snack-bar
spec:
selector:
app: payment-webhook-api
ports:
- port: 3001
targetPort: 3001
type: LoadBalancer
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion payment-webhook
26 changes: 0 additions & 26 deletions snack-bar-api/infra/k8s/api-deployment.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions snack-bar-api/infra/k8s/api-service.yaml

This file was deleted.

Loading