kt-event-marketing/content-service-deployment.yaml
cherry2250 019ac96daa HuggingFace 제거 및 Replicate API 통합 완료
주요 변경사항:
- HuggingFace 관련 코드 및 의존성 완전 제거
  - HuggingFaceImageGenerator.java 삭제
  - HuggingFaceApiClient.java 삭제
  - HuggingFaceRequest.java 삭제
  - Resilience4j의 HuggingFace CircuitBreaker 제거

- Kubernetes 배포 설정
  - Deployment: content-service-deployment.yaml 업데이트
  - Service: content-service-service.yaml 추가
  - Health check 경로 수정 (/api/v1/content/actuator/health)
  - Dockerfile 추가 (멀티스테이지 빌드)

- Spring Boot 설정 최적화
  - application.yml: context-path 설정 (/api/v1/content)
  - HuggingFace 설정 제거, Replicate API 설정 유지
  - CORS 설정: kt-event-marketing* 도메인 허용

- Controller 경로 수정
  - ContentController: @RequestMapping 중복 제거
  - context-path와의 충돌 해결

- Security 설정
  - Chrome DevTools 경로 예외 처리 추가 (/.well-known/**)
  - CORS 설정 강화

- Swagger/OpenAPI 설정
  - VM Development Server URL 추가
  - 서버 URL 우선순위 조정

- 환경 변수 통일
  - REPLICATE_API_KEY → REPLICATE_API_TOKEN으로 변경

테스트 결과:
 Replicate API 정상 작동 (이미지 생성 성공)
 Azure Blob Storage 업로드 성공
 Redis 연결 정상 (마스터 노드 연결)
 Swagger UI 정상 작동
 모든 API 엔드포인트 정상 응답

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 23:08:54 +09:00

65 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: content-service
namespace: kt-event-marketing
labels:
app: content-service
spec:
replicas: 1
selector:
matchLabels:
app: content-service
template:
metadata:
labels:
app: content-service
spec:
containers:
- name: content-service
image: acrdigitalgarage01.azurecr.io/content-service:latest
imagePullPolicy: Always
ports:
- containerPort: 8084
name: http
protocol: TCP
envFrom:
- configMapRef:
name: cm-common
- configMapRef:
name: cm-content-service
- secretRef:
name: secret-common
- secretRef:
name: secret-content-service
resources:
requests:
cpu: 256m
memory: 512Mi
limits:
cpu: 1024m
memory: 1024Mi
startupProbe:
httpGet:
path: /api/v1/content/actuator/health
port: 8084
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet:
path: /api/v1/content/actuator/health/liveness
port: 8084
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /api/v1/content/actuator/health/readiness
port: 8084
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 3
imagePullSecrets:
- name: kt-event-marketing