183 lines
3.9 KiB
YAML
183 lines
3.9 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: paragliding
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: paragliding-config
|
|
namespace: paragliding
|
|
data:
|
|
PORT: "8080"
|
|
LOCATION_LAT: "32.8893"
|
|
LOCATION_LON: "-117.2519"
|
|
LOCATION_NAME: "Torrey Pines Gliderport"
|
|
TIMEZONE: "America/Los_Angeles"
|
|
FETCH_INTERVAL: "15m"
|
|
CACHE_TTL: "10m"
|
|
NEXT_PUBLIC_API_URL: "https://paragliding.scottyah.com/api/v1"
|
|
|
|
---
|
|
# Backend Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: paragliding-api
|
|
namespace: paragliding
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: paragliding-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: paragliding-api
|
|
spec:
|
|
containers:
|
|
- name: api
|
|
image: harbor.scottyah.com/scottyah/paragliding-api:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8080
|
|
envFrom:
|
|
- configMapRef:
|
|
name: paragliding-config
|
|
- secretRef:
|
|
name: paragliding-secrets
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "500m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
imagePullSecrets:
|
|
- name: harborcred
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: paragliding-api-svc
|
|
namespace: paragliding
|
|
spec:
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
selector:
|
|
app: paragliding-api
|
|
|
|
---
|
|
# Frontend Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: paragliding-web
|
|
namespace: paragliding
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: paragliding-web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: paragliding-web
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: harbor.scottyah.com/scottyah/paragliding-web:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 3000
|
|
envFrom:
|
|
- configMapRef:
|
|
name: paragliding-config
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
imagePullSecrets:
|
|
- name: harborcred
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: paragliding-web-svc
|
|
namespace: paragliding
|
|
spec:
|
|
ports:
|
|
- port: 3000
|
|
targetPort: 3000
|
|
protocol: TCP
|
|
selector:
|
|
app: paragliding-web
|
|
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: paragliding-ingress
|
|
namespace: paragliding
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
|
spec:
|
|
ingressClassName: traefik
|
|
tls:
|
|
- hosts:
|
|
- paragliding.scottyah.com
|
|
secretName: paragliding-tls
|
|
rules:
|
|
- host: paragliding.scottyah.com
|
|
http:
|
|
paths:
|
|
- path: /api
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: paragliding-api-svc
|
|
port:
|
|
number: 8080
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: paragliding-web-svc
|
|
port:
|
|
number: 3000
|