-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/게이트웨이 모니터링용 엔드포인트 노출 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feat/\uAC8C\uC774\uD2B8\uC6E8\uC774-\uBAA8\uB2C8\uD130\uB9C1\uC6A9-\uC5D4\uB4DC\uD3EC\uC778\uD2B8-\uB178\uCD9C"
Changes from all commits
47103f4
f559f65
5679410
58b1063
fbcc127
fca64be
21e9dbb
fc4e8ec
add3388
803ec9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||
| apiVersion: v1 | ||||||
| kind: Service | ||||||
| metadata: | ||||||
| name: gateway-metrics-service | ||||||
| namespace: pinit | ||||||
| spec: | ||||||
| selector: | ||||||
| app: pinit-gateway | ||||||
| ports: | ||||||
| - protocol: TCP | ||||||
| port: 9095 | ||||||
| targetPort: 9095 | ||||||
| type: NodePort | ||||||
|
||||||
| type: NodePort | |
| type: ClusterIP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ public SecurityWebFilterChain mainSecurityFilterChain(ServerHttpSecurity http, | |
| JwtAuthenticationFilter jwtAuthenticationFilter) { | ||
| return applyCommon(http) | ||
| .authorizeExchange(auth -> auth | ||
| .pathMatchers("/actuator/health/liveness", "/actuator/health/readiness", "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() | ||
| .pathMatchers("/actuator/prometheus", "/actuator/health/liveness", "/actuator/health/readiness", "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() | ||
|
||
| .anyExchange().authenticated() | ||
| ) | ||
| .addFilterAt(jwtAuthenticationFilter, SecurityWebFiltersOrder.AUTHENTICATION) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,15 @@ spring: | |||||
| - Host=localhost:8080 | ||||||
| filters: | ||||||
| - JwtSubToMemberIdHeader | ||||||
| metrics: | ||||||
| enabled: true | ||||||
|
Comment on lines
+25
to
+26
|
||||||
| management: | ||||||
| server: | ||||||
| port: 9096 | ||||||
| endpoints: | ||||||
| web: | ||||||
| exposure: | ||||||
| include: "health,info,metrics,prometheus" | ||||||
|
||||||
| include: "health,info,metrics,prometheus" | |
| include: "prometheus" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,16 @@ spring: | |||||
| - Host=api.pinit.go-gradually.me | ||||||
| filters: | ||||||
| - JwtSubToMemberIdHeader | ||||||
| metrics: | ||||||
| enabled: true | ||||||
|
Comment on lines
+25
to
+26
|
||||||
| management: | ||||||
| server: | ||||||
| port: 9095 | ||||||
| endpoints: | ||||||
| web: | ||||||
| exposure: | ||||||
| include: "health,info,metrics,prometheus" | ||||||
|
||||||
| include: "health,info,metrics,prometheus" | |
| include: "health,prometheus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
문제점: 관리 엔드포인트가 별도의 포트(9095)에서 실행되도록 설정되었지만, Kubernetes Deployment에 해당 포트가 노출되지 않았습니다.
영향: Kubernetes 환경에서 메트릭 서비스(gateway-metrics-service)가 포트 9095로 트래픽을 전달하려고 하지만, 컨테이너가 해당 포트를 노출하지 않아 연결이 실패합니다.
수정 제안: k8s/deployment.yaml의 ports 섹션에 관리 포트를 추가해야 합니다. containerPort: 9095를 name: management로 추가하세요.