fase 1
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: medusa-deploy
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
maxSurge: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: medusa
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: medusa
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry-secret
|
||||
|
||||
initContainers:
|
||||
- name: migrations
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- npx
|
||||
- medusa
|
||||
- db:migrate
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: commerce-config
|
||||
- secretRef:
|
||||
name: commerce-secrets
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
|
||||
containers:
|
||||
- name: medusa
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: commerce-config
|
||||
- secretRef:
|
||||
name: commerce-secrets
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9000
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 18
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
memory: 384Mi
|
||||
limits:
|
||||
cpu: 750m
|
||||
memory: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: medusa-svc
|
||||
spec:
|
||||
selector:
|
||||
app: medusa
|
||||
ports:
|
||||
- name: http
|
||||
port: 9000
|
||||
targetPort: 9000
|
||||
Reference in New Issue
Block a user