Merge fix/adr0006-etapa2-fase1-meilisearch-infra into main
This commit is contained in:
commit
688a7d8e97
4 files changed
+100
No files matched your search
@@ -19,3 +19,8 @@ data:
|
|||||||
S3_ENDPOINT: http://minio-svc:9000
|
S3_ENDPOINT: http://minio-svc:9000
|
||||||
S3_REGION: us-east-1
|
S3_REGION: us-east-1
|
||||||
S3_BUCKET: ari-products
|
S3_BUCKET: ari-products
|
||||||
|
|
||||||
|
# Leido por el plugin @rokmohar/medusa-plugin-meilisearch (nombre de
|
||||||
|
# env var del plugin, no del servidor Meilisearch en si -- ver
|
||||||
|
# MEILI_MASTER_KEY en secrets.template.yaml).
|
||||||
|
MEILISEARCH_HOST: http://meilisearch-svc:7700
|
||||||
@@ -7,6 +7,7 @@ resources:
|
|||||||
- redis.yaml
|
- redis.yaml
|
||||||
- minio.yaml
|
- minio.yaml
|
||||||
- minio-bootstrap-job.yaml
|
- minio-bootstrap-job.yaml
|
||||||
|
- meilisearch.yaml
|
||||||
- medusa/
|
- medusa/
|
||||||
- ingress-commerce.yaml
|
- ingress-commerce.yaml
|
||||||
- middleware-commerce-redirect.yaml
|
- middleware-commerce-redirect.yaml
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: meilisearch-svc
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: commerce-meilisearch
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 7700
|
||||||
|
targetPort: 7700
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: commerce-meilisearch
|
||||||
|
spec:
|
||||||
|
serviceName: meilisearch-svc
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: commerce-meilisearch
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: commerce-meilisearch
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: meilisearch
|
||||||
|
image: getmeili/meilisearch:v1.53.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: MEILI_MASTER_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: commerce-secrets
|
||||||
|
key: MEILI_MASTER_KEY
|
||||||
|
- name: MEILI_ENV
|
||||||
|
value: production
|
||||||
|
# Sin telemetria a un tercero por defecto (misma postura del
|
||||||
|
# resto del namespace: nada de egress no explicado).
|
||||||
|
- name: MEILI_NO_ANALYTICS
|
||||||
|
value: "true"
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 7700
|
||||||
|
# /health no requiere auth (confirmado en vivo) -- sirve tal
|
||||||
|
# cual para las dos probes, igual que minio usa sus propios
|
||||||
|
# endpoints /minio/health/*.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 20
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 6
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 768Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: meilisearch-data
|
||||||
|
mountPath: /meili_data
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: meilisearch-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
@@ -23,6 +23,14 @@ stringData:
|
|||||||
JWT_SECRET: CAMBIAR
|
JWT_SECRET: CAMBIAR
|
||||||
COOKIE_SECRET: CAMBIAR
|
COOKIE_SECRET: CAMBIAR
|
||||||
|
|
||||||
|
# Master key del servidor Meilisearch (StatefulSet commerce-meilisearch,
|
||||||
|
# env MEILI_MASTER_KEY del propio contenedor getmeili/meilisearch) Y
|
||||||
|
# credencial que usa el plugin de Medusa para autenticarse contra el
|
||||||
|
# -- MISMO valor, dos nombres de secret porque cada lado (servidor vs.
|
||||||
|
# plugin cliente) usa su propia convencion de nombre de env var.
|
||||||
|
MEILI_MASTER_KEY: CAMBIAR
|
||||||
|
MEILISEARCH_API_KEY: CAMBIAR
|
||||||
|
|
||||||
# Debe ser el MISMO valor que REVALIDATE_SECRET en el Secret
|
# Debe ser el MISMO valor que REVALIDATE_SECRET en el Secret
|
||||||
# commerce-storefront: el subscriber de Medusa lo envía como header
|
# commerce-storefront: el subscriber de Medusa lo envía como header
|
||||||
# x-revalidate-secret al invocar POST /api/revalidate en el storefront.
|
# x-revalidate-secret al invocar POST /api/revalidate en el storefront.
|
||||||
|
|||||||
Reference in new issue
Block a user