Repository navigation
feat(infra): collect k8s events via alloy - #3805
manamana32321 wants to merge 2 commits into
Conversation
Add a `loki.source.kubernetes_events` pipeline to the existing Alloy release so cluster Events reach Loki before etcd expires them after about an hour. Events are written under `job="kubernetes-events"` as JSON with an `environment` label. Event watching is cluster-scoped, so it needs a ClusterRole. The chart renders either namespaced Roles or a ClusterRole but never both, and drops `rbac.clusterRules` while `rbac.namespaces` is set, so the events ClusterRole and ClusterRoleBinding are declared in `extraObjects`. Pod discovery keeps its namespaced Role in `iris`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88359ba13b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Description
쿠버네티스 Event를 Loki에 모아 남깁니다. Event는 약 1시간 뒤 사라지는데, 파드가 왜 죽었는지는 메트릭이 아니라 Event에 적혀 있습니다.
{job="kubernetes-events"},| json으로 사유·대상을 걸러 볼 수 있습니다.Additional context
Alloy 차트는 네임스페이스 한정 권한과 클러스터 전체 권한 중 하나만 만듭니다.
rbac.namespaces가 지정돼 있으면rbac.clusterRules는 조용히 무시됩니다 — 배포도 설정 검사도 통과하지만 Alloy 로그에 권한 거부만 남고 Event가 안 들어옵니다.그래서 Event 권한은
extraObjects로 직접 선언했습니다. #3788 의iris한정 파드 조회 권한은 그대로 유지됩니다.Before submitting the PR, please make sure you do the following
fixes #123).🤖 Generated with Claude Code