fix: K8s client 버전 업그레이드 및 스케줄러 마비 수정 (closes #48)#49
Merged
Conversation
- build.gradle: client-java 21.0.1 → 24.0.0 (K8s 1.34 지원, observedGeneration 호환) - KubernetesService: catch ApiException → Exception으로 확대 (방어 코드) - MetricsCollectionScheduler: getAllPods() 호출을 outer try/catch로 보호 - AnomalyDetectionService: getAllPods() 호출을 outer try/catch로 보호 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
관련 이슈
closes #48
변경 사항
build.gradle:client-java:21.0.1→24.0.0KubernetesService:catch (ApiException)→catch (Exception)(3곳)MetricsCollectionScheduler: outer try/catch 추가AnomalyDetectionService: outer try/catch 추가작업 내용 상세
근본 원인
K8s 1.31+에서
V1PodStatus에observedGeneration필드가 추가됐는데,client-java:21.0.1(K8s 1.30 기반)이 이를 인식하지 못해 JSON 역직렬화 시IllegalArgumentException발생. 이 예외가catch (ApiException)을 통과해 스케줄러 메서드 전체를 죽임.수정 내용
client-java:24.0.0으로 올려 K8s 1.34까지 지원ApiException→Exception체크리스트
./gradlew build성공 확인