backoffice dev
This commit is contained in:
parent
bc64a76ce2
commit
3993dede92
3 changed files with 88 additions and 0 deletions
48
k8s/dev/backoffice-deployment.yaml
Normal file
48
k8s/dev/backoffice-deployment.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gohorse-backoffice
|
||||||
|
namespace: gohorsejobsdev
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gohorse-backoffice
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: gohorse-backoffice
|
||||||
|
env: development
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harbor-registry
|
||||||
|
containers:
|
||||||
|
- name: backoffice
|
||||||
|
# Imagem apontando para o projeto correto no Harbor
|
||||||
|
image: in.gohorsejobs.com/gohorsejobs-backoffice-dev/backoffice:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 3001
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: backend-secrets
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
# Ajuste os caminhos de probe conforme a saúde da sua aplicação NestJS/Node
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 3001
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 20
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 3001
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
27
k8s/dev/backoffice-ingress-dev.yaml
Normal file
27
k8s/dev/backoffice-ingress-dev.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: gohorse-backoffice-ingress-dev
|
||||||
|
namespace: gohorsejobsdev
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-dns
|
||||||
|
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: b-dev.gohorsejobs.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: gohorse-backoffice-service
|
||||||
|
port:
|
||||||
|
number: 3001
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- b-dev.gohorsejobs.com
|
||||||
|
secretName: gohorse-backoffice-b-dev-cert
|
||||||
13
k8s/dev/backoffice-service.yaml
Normal file
13
k8s/dev/backoffice-service.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: gohorse-backoffice-service
|
||||||
|
namespace: gohorsejobsdev
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: gohorse-backoffice
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 3001
|
||||||
|
targetPort: 3001
|
||||||
|
type: ClusterIP
|
||||||
Loading…
Reference in a new issue