INIT(app): initial setup

- Initialize project structure
- Add base application files
This commit is contained in:
2025-12-23 22:31:45 +09:00
commit 346b0c79ef
16 changed files with 1006 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mas
namespace: mas
labels:
app: mas
spec:
replicas: 2
selector:
matchLabels:
app: mas
template:
metadata:
labels:
app: mas
spec:
containers:
- name: mas
image: harbor.mayne.vcn/mas/platform:latest
ports:
- containerPort: 8000
name: http
env:
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: anthropic-api-key
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: openai-api-key
- name: GOOGLE_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: google-api-key
- name: GROQ_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: groq-api-key
- name: GROQ_API_BASE
value: "https://api.groq.com/openai/v1"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: mas-postgres
key: database-url
- name: REDIS_URL
value: "redis://redis:6379/0"
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "2000m"
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10
periodSeconds: 5

29
deploy/k8s/ingress.yaml Normal file
View File

@@ -0,0 +1,29 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mas
namespace: mas
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/websocket-services: "mas"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
spec:
ingressClassName: nginx
tls:
- hosts:
- mas.mayne.vcn
secretName: mas-tls
rules:
- host: mas.mayne.vcn
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mas
port:
number: 8000

View File

@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mas
resources:
- namespace.yaml
- ../vault/mas-api-keys.yaml
- ../vault/mas-postgres.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: mas
labels:
name: mas

17
deploy/k8s/service.yaml Normal file
View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: mas
namespace: mas
labels:
app: mas
spec:
type: ClusterIP
ports:
- port: 8000
targetPort: 8000
protocol: TCP
name: http
selector:
app: mas