Skip to content

chore: init hackathon codebase - #12

Merged
Life-00 merged 1 commit into
mainfrom
feature/kuber
Jan 19, 2026
Merged

chore: init hackathon codebase#12
Life-00 merged 1 commit into
mainfrom
feature/kuber

Conversation

@Life-00

@Life-00 Life-00 commented Jan 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 19, 2026 12:04
@Life-00
Life-00 merged commit 2b6d47a into main Jan 19, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR initializes the hackathon codebase with infrastructure configurations including Kubernetes manifests, Docker configurations, and docker-compose setup for a full-stack application (TVA - Target Validation Assistant).

Changes:

  • Added Kubernetes deployment configurations for frontend, ingress, and secrets
  • Added frontend Dockerfile with multi-stage build using Node.js and nginx
  • Updated docker-compose.yml to include frontend service and modernize ChromaDB configuration

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
k8s-secrets.env Adds Kubernetes secrets file with API keys and JWT secret (contains security issues)
infra/k8s/application/07-ingress.yaml Adds Traefik ingress configuration for routing frontend and backend services
infra/k8s/application/06-frontend.yaml Adds Kubernetes deployment and service configuration for frontend
infra/k8s/application/init.py Empty Python init file for package structure
infra/k8s/init.py Empty Python init file for package structure
infra/init.py Empty Python init file for package structure
frontend/Dockerfile Adds multi-stage Dockerfile for building and serving frontend with nginx
docker-compose.yml Updates ChromaDB configuration, adjusts backend context path, and adds frontend service
Comments suppressed due to low confidence (5)

docker-compose.yml:138

  • The named volume 'chroma_data' has been removed from the volumes section, but this is inconsistent with the ChromaDB service configuration. If the intent is to use an anonymous volume (as indicated by line 35), the volume definition should be removed. However, if data persistence is needed, the named volume should be retained and properly referenced in the service configuration.
    docker-compose.yml:35
  • The volume configuration has been changed from a named volume reference to an anonymous volume. This configuration creates an anonymous volume that will not persist data between container restarts. If data persistence is needed for ChromaDB, this should use a named volume like 'chroma_data:/chroma/chroma' instead of just '/chroma_data'.
    docker-compose.yml:113
  • The frontend service is configured to expose port 3000 but map it to port 5173 inside the container. However, the Dockerfile uses nginx which serves on port 80, not 5173. The port mapping should be '3000:80' to match the nginx configuration in the Dockerfile.
    docker-compose.yml:121
  • The frontend build uses build-time arguments for Vite environment variables, but the docker-compose service is configured with runtime environment variables. Vite environment variables need to be passed as build arguments (using 'args:' under 'build:'), not as runtime environment variables, since the build happens during the Docker build phase, not at container runtime.
    docker-compose.yml:129
  • The volume mounts are attempting to mount source code and configuration files for development hot-reload, but the Dockerfile uses a multi-stage build that produces a production nginx image with only the built static files. These volume mounts will not work as intended because:
  1. The production image doesn't have the source code or development server
  2. The nginx stage serves pre-built files from /usr/share/nginx/html, not live source code
    For development with hot-reload, you need a separate development Dockerfile or override the command to run a development server.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

name: tva-ingress
namespace: tva
annotations:
# k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains a Korean character sequence (기본) which should be accompanied by an English translation or written entirely in English for consistency with the rest of the codebase and to ensure accessibility for all developers.

Suggested change
# k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장
# Recommended because Traefik is often the default ingress controller in k3s

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +20
# 프론트에서 VITE_API_BASE_URL을 "https://tva.example.com"로 두고,
# API 호출을 "/api/v1/..." 형태로 하도록 맞추는 걸 추천

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains Korean text (프론트에서, 를, 로, 두고, 형태로, 하도록, 맞추는, 걸, 추천) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.

Copilot uses AI. Check for mistakes.
port:
number: 80

# (선택) TLS 붙일 때

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains Korean text (선택, 붙일, 때) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.

Suggested change
# (선택) TLS 붙일 때
# (Optional) When adding TLS (선택) TLS 붙일 때

Copilot uses AI. Check for mistakes.
Comment thread k8s-secrets.env
@@ -0,0 +1,2 @@
UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D"
JWT_SECRET_KEY=1234

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JWT_SECRET_KEY value "1234" is extremely weak and insecure. This should be a strong, randomly generated secret (e.g., at least 32 bytes of random data, base64 encoded). However, this entire file should not be in version control at all.

Suggested change
JWT_SECRET_KEY=1234
JWT_SECRET_KEY="q3Tt9YH8vC4Lk2Pz7Xn5Sa0Bd9Mf6RgQ"

Copilot uses AI. Check for mistakes.
# k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장
kubernetes.io/ingress.class: traefik

# (선택) 큰 요청 바디 필요하면(업로드 등) Traefik/Nginx 쪽 설정이 추가로 필요할 수 있음

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains Korean text (선택, 큰, 요청, 바디, 필요하면, 업로드, 등) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.

Copilot uses AI. Check for mistakes.
port:
number: 8000

# ✅ Frontend (nginx 정적) - 나머지는 전부 프론트로

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains Korean text (나머지는, 전부, 프론트로) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.

Suggested change
# ✅ Frontend (nginx 정적) - 나머지는 전부 프론트로
# ✅ Frontend (nginx static) - route all remaining traffic to the frontend

Copilot uses AI. Check for mistakes.
Comment thread k8s-secrets.env
Comment on lines +1 to +2
UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D"
JWT_SECRET_KEY=1234

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains hardcoded API keys and secrets that should never be committed to version control. The UPSTAGE_API_KEY appears to be a real API key, and JWT_SECRET_KEY is a weak secret. These should be:

  1. Removed from version control immediately
  2. Added to .gitignore
  3. Stored securely in Kubernetes secrets or a secret management system
  4. The exposed API key should be rotated/regenerated
Suggested change
UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D"
JWT_SECRET_KEY=1234
UPSTAGE_API_KEY="__UPSTAGE_API_KEY__"
JWT_SECRET_KEY=__JWT_SECRET_KEY__

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants