Files
la-huasca-ts/k8s/app.yaml
T

112 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: la-huasca-ts
namespace: lahuasca
spec:
replicas: 1
selector:
matchLabels:
app: la-huasca-ts
template:
metadata:
labels:
app: la-huasca-ts
spec:
imagePullSecrets:
- name: la-huasca-registry
containers:
- name: la-huasca-ts
image: gitea.ajavasoft.com/muken/la-huasca-ts:latest
ports:
- containerPort: 3000
name: http
env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: la-huasca-db-secrets
key: DATABASE_URL
- name: BOOTSTRAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: la-huasca-bootstrap-secrets
key: BOOTSTRAP_ADMIN_PASSWORD
- name: BOOTSTRAP_USER_PASSWORD
valueFrom:
secretKeyRef:
name: la-huasca-bootstrap-secrets
key: BOOTSTRAP_USER_PASSWORD
- name: BOOTSTRAP_WIFI_PASSWORD
valueFrom:
secretKeyRef:
name: la-huasca-bootstrap-secrets
key: BOOTSTRAP_WIFI_PASSWORD
- name: BOOTSTRAP_TAGLINE
valueFrom:
configMapKeyRef:
name: la-huasca-bootstrap-config
key: BOOTSTRAP_TAGLINE
readinessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
livenessProbe:
httpGet:
path: /api/health
port: http
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 2
failureThreshold: 3
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: la-huasca-ts
namespace: lahuasca
spec:
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: la-huasca-ts
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: la-huasca-ts
namespace: lahuasca
spec:
ingressClassName: traefik
tls:
- hosts:
- lahuasca.com
secretName: la-huasca-ts-tls
rules:
- host: lahuasca.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: la-huasca-ts
port:
number: 80