mirror of
https://github.com/won-ktds/smarketing-manifest.git
synced 2025-12-06 08:36:23 +00:00
Add smarketing-ai deployment manifest
This commit is contained in:
parent
8694e4e0e0
commit
3788e9f14a
@ -0,0 +1,110 @@
|
|||||||
|
# ConfigMap
|
||||||
|
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"
|
||||||
|
ALLOWED_EXTENSIONS: "png,jpg,jpeg,gif,webp"
|
||||||
|
AZURE_STORAGE_CONTAINER_NAME: "ai-content"
|
||||||
|
---
|
||||||
|
# Secret
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: smarketing-secret
|
||||||
|
namespace: smarketing
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
SECRET_KEY: "your-secret-key-here"
|
||||||
|
CLAUDE_API_KEY: "your-claude-api-key-here"
|
||||||
|
OPENAI_API_KEY: "your-openai-api-key-here"
|
||||||
|
AZURE_STORAGE_ACCOUNT_NAME: "your-azure-storage-account"
|
||||||
|
AZURE_STORAGE_ACCOUNT_KEY: "your-azure-storage-key"
|
||||||
|
---
|
||||||
|
# Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: smarketing-ai
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: smarketing-ai
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: smarketing-ai
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: smarketing-ai
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: smarketing-ai
|
||||||
|
image: acrdigitalgarage02.azurecr.io/won/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
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 5001
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 5001
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
volumes:
|
||||||
|
- name: upload-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: temp-storage
|
||||||
|
emptyDir: {}
|
||||||
|
---
|
||||||
|
# Service (LoadBalancer type for External IP)
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: smarketing-ai-service
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: smarketing-ai
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 5001
|
||||||
|
targetPort: 5001
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: smarketing-ai
|
||||||
Loading…
x
Reference in New Issue
Block a user