mirror of
https://github.com/won-ktds/smarketing-backend.git
synced 2025-12-06 07:06:24 +00:00
feat: manifest 파일 생성
This commit is contained in:
parent
1861cd5655
commit
b764e95e20
11
smarketing-ai/deployment/manifest/configmap.yaml
Normal file
11
smarketing-ai/deployment/manifest/configmap.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: smarketing-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
SERVER_HOST: "0.0.0.0"
|
||||||
|
SERVER_PORT: "5001"
|
||||||
|
UPLOAD_FOLDER: "/app/uploads"
|
||||||
|
MAX_CONTENT_LENGTH: "16777216" # 16MB
|
||||||
|
ALLOWED_EXTENSIONS: "png,jpg,jpeg,gif,webp"
|
||||||
47
smarketing-ai/deployment/manifest/deployment.yaml
Normal file
47
smarketing-ai/deployment/manifest/deployment.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: smarketing
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: smarketing
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: smarketing
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: smarketing
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: smarketing
|
||||||
|
image: dg0408cr.azurecr.io/smarketing/smarketing-ai:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 5001
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 256m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 1024m
|
||||||
|
memory: 2048Mi
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: smarketing-config
|
||||||
|
- secretRef:
|
||||||
|
name: smarketing-secret
|
||||||
|
volumeMounts:
|
||||||
|
- name: upload-storage
|
||||||
|
mountPath: /app/uploads
|
||||||
|
- name: temp-storage
|
||||||
|
mountPath: /app/uploads/temp
|
||||||
|
volumes:
|
||||||
|
- name: upload-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: temp-storage
|
||||||
|
emptyDir: {}
|
||||||
26
smarketing-ai/deployment/manifest/ingress.yaml
Normal file
26
smarketing-ai/deployment/manifest/ingress.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: smarketing-ingress
|
||||||
|
namespace: smarketing
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: nginx
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "16m"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
|
||||||
|
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
|
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
||||||
|
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: smarketing.20.249.184.228.nip.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: smarketing-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
10
smarketing-ai/deployment/manifest/secret.yaml
Normal file
10
smarketing-ai/deployment/manifest/secret.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: smarketing-secret
|
||||||
|
namespace: smarketing
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
SECRET_KEY: "your-secret-key-change-in-production"
|
||||||
|
CLAUDE_API_KEY: "your-claude-api-key"
|
||||||
|
OPENAI_API_KEY: "your-openai-api-key"
|
||||||
16
smarketing-ai/deployment/manifest/service.yaml
Normal file
16
smarketing-ai/deployment/manifest/service.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: smarketing-service
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: smarketing
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 5001
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: smarketing
|
||||||
Loading…
x
Reference in New Issue
Block a user