110 lines
2.0 KiB
YAML
110 lines
2.0 KiB
YAML
global:
|
|
namespace: my-apps
|
|
imagePullSecrets: []
|
|
|
|
# Backend configuration
|
|
backend:
|
|
name: backend
|
|
replicaCount: 2
|
|
image:
|
|
repository: harbor.dvirlabs.com/my-apps/my-recipes-backend
|
|
pullPolicy: IfNotPresent
|
|
tag: "latest"
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 8000
|
|
targetPort: 8000
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
|
|
env:
|
|
PYTHONUNBUFFERED: "1"
|
|
|
|
# Frontend configuration
|
|
frontend:
|
|
name: frontend
|
|
replicaCount: 2
|
|
image:
|
|
repository: harbor.dvirlabs.com/my-apps/my-recipes-frontend
|
|
pullPolicy: IfNotPresent
|
|
tag: "latest"
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 3000
|
|
targetPort: 3000
|
|
|
|
env:
|
|
API_BASE: "https://my-recipes.dvirlabs.com/api"
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
|
|
# PostgreSQL configuration
|
|
postgres:
|
|
name: db
|
|
image:
|
|
repository: postgres
|
|
tag: "16-alpine"
|
|
pullPolicy: IfNotPresent
|
|
|
|
user: recipes_user
|
|
password: recipes_password
|
|
database: recipes_db
|
|
port: 5432
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 5432
|
|
targetPort: 5432
|
|
|
|
persistence:
|
|
enabled: true
|
|
accessMode: ReadWriteOnce
|
|
storageClass: "nfs-client"
|
|
size: 10Gi
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
|
|
# Ingress configuration
|
|
ingress:
|
|
enabled: true
|
|
className: "nginx"
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
|
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
hosts:
|
|
- host: my-recipes.dvirlabs.com
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend: frontend
|
|
# use a regex to capture and rewrite /api/... to /... on the backend
|
|
- path: /api(/|$)(.*)
|
|
pathType: ImplementationSpecific
|
|
backend: backend
|
|
tls:
|
|
- secretName: recipes-tls
|
|
hosts:
|
|
- my-recipes.dvirlabs.com
|
|
|