198 lines
4.1 KiB
YAML
198 lines
4.1 KiB
YAML
# Lux Cloud - bootnode API + web on lux-k8s
|
|
# Serves cloud.lux.network
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: bootnode-api
|
|
namespace: bootnode
|
|
labels:
|
|
app: bootnode-api
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: bootnode-api
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: bootnode-api
|
|
spec:
|
|
containers:
|
|
- name: api
|
|
image: ghcr.io/hanzoai/bootnode:1.0.0-amd64-api
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
env:
|
|
- name: APP_ENV
|
|
value: "production"
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: bootnode-secrets
|
|
key: database-url
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: bootnode-secrets
|
|
key: redis-url
|
|
resources:
|
|
requests:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
limits:
|
|
cpu: "2000m"
|
|
memory: "2Gi"
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: bootnode-api
|
|
namespace: bootnode
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http
|
|
selector:
|
|
app: bootnode-api
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: lux-cloud-web
|
|
namespace: bootnode
|
|
labels:
|
|
app: lux-cloud-web
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: lux-cloud-web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: lux-cloud-web
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: ghcr.io/hanzoai/bootnode:0.0.1-web
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 3001
|
|
name: http
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: NEXT_PUBLIC_API_URL
|
|
value: "https://api.cloud.lux.network"
|
|
- name: NEXT_PUBLIC_WS_URL
|
|
value: "wss://ws.cloud.lux.network"
|
|
- name: NEXT_PUBLIC_IAM_URL
|
|
value: "https://iam.lux.network"
|
|
- name: NEXT_PUBLIC_IAM_CLIENT_ID
|
|
value: "lux-web3"
|
|
- name: NEXT_PUBLIC_IAM_DOMAIN
|
|
value: "lux.id"
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: lux-cloud-web
|
|
namespace: bootnode
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 3001
|
|
targetPort: 3001
|
|
selector:
|
|
app: lux-cloud-web
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lux-cloud-ingress
|
|
namespace: bootnode
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
spec:
|
|
ingressClassName: ingress
|
|
tls:
|
|
- hosts:
|
|
- cloud.lux.network
|
|
- api.cloud.lux.network
|
|
secretName: lux-cloud-tls
|
|
rules:
|
|
- host: cloud.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: lux-cloud-web
|
|
port:
|
|
number: 3001
|
|
- host: api.cloud.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: bootnode-api
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lux-cloud-ws-ingress
|
|
namespace: bootnode
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
spec:
|
|
ingressClassName: ingress
|
|
tls:
|
|
- hosts:
|
|
- ws.cloud.lux.network
|
|
secretName: lux-cloud-ws-tls
|
|
rules:
|
|
- host: ws.cloud.lux.network
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: bootnode-api
|
|
port:
|
|
number: 80
|