fix(server): 실행 컨텍스트와 배포 설정 통합 - #3
Open
danpung2 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
REST와 gRPC 전송 계층이 각각
LogService구현을 등록하면서all모드의 Spring 컨텍스트에서 빈 충돌이 발생했고, 프로토콜·포트 설정 키가 실행 방식과 배포 파일마다 달라 특정 프로필과 컨테이너 환경의 동작이 일치하지 않았습니다. 또한 REST 프로필에서 서비스 빈은 제외됐지만 gRPC health/reflection listener가 계속 50051 포트를 열고 있었습니다.변경 사항
DefaultLogService를 core 모듈에 추가하고 REST/gRPC 전용 중복 구현을 제거했습니다.logpilot.protocol과LOGPILOT_PROTOCOL로 통일하고rest,grpc,all모드의 조건부 구성을 정리했습니다.grpc.server.port를-1로 설정해 gRPC listener를 완전히 비활성화하고 회귀 테스트를 추가했습니다.x-api-key로 통일했습니다.검증
./gradlew test성공: 41개 테스트 스위트, 239개 테스트, 실패·오류·스킵 0UP확인SendLog,FetchLogs성공Unauthenticated로 거부되는 것을 확인docker compose config -q성공kubectl kustomize k8s성공: 610줄 렌더링1/1 Ready, 재시작 0, PVCBound확인운영 참고
LOGPILOT_API_KEY를 외부에서 제공해야 하며 manifest에는 비밀 값을 저장하지 않습니다.