-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Tempo metricsGenerator + Alloy logpods 수집 개선 #54
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| {{- if .Values.podLogs.enabled }} | ||
|
|
||
| apiVersion: monitoring.grafana.com/v1alpha2 | ||
|
|
||
| kind: PodLogs | ||
|
|
||
| # 메타데이터 | ||
| metadata: | ||
| name: {{ .Release.Name }}-pods | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/name: monitoring-alloy | ||
| app.kubernetes.io/component: podlogs | ||
|
|
||
| # 스펙. 현재는 모드 파드 수집 진행함. | ||
| spec: | ||
| namespaceSelector: {} | ||
| selector: {} | ||
|
|
||
| # 라벨링 | ||
| relabelings: | ||
| # 네임스페이스는 가장 기본적인 조회 축이라 그대로 보존합니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_namespace | ||
| targetLabel: namespace | ||
|
|
||
| # Pod 이름을 그대로 라벨로 남겨 개별 인스턴스 추적에 사용합니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_name | ||
| targetLabel: pod | ||
|
|
||
| # 컨테이너 이름은 service fallback과 세부 필터링에 함께 사용합니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_container_name | ||
| targetLabel: container | ||
|
|
||
| # 장애 분석 시 노드 기준 조회가 가능하도록 노드 이름을 남깁니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_node_name | ||
| targetLabel: node | ||
|
|
||
| # service 추출 규칙: 우선순위가 낮은 것부터 높은 순서로 덮어씁니다. | ||
|
|
||
| # 1. 기본값: 컨테이너 이름 | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_container_name | ||
| targetLabel: service | ||
| # 2. Pod controller가 ReplicaSet이면 Deployment 이름 추출 | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_controller_kind | ||
| - __meta_kubernetes_pod_controller_name | ||
| separator: / | ||
| regex: ReplicaSet/(.+)-[a-z0-9]{8,10}$ | ||
| replacement: $1 | ||
| targetLabel: service | ||
|
|
||
| # 3. app 라벨이 있으면 우선 사용 | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_label_app | ||
| regex: (.+) | ||
| targetLabel: service | ||
|
|
||
| # 4. 표준 app.kubernetes.io/name 라벨이 있으면 최우선 | ||
| - sourceLabels: | ||
| - __meta_kubernetes_pod_label_app_kubernetes_io_name | ||
| regex: (.+) | ||
| targetLabel: service | ||
|
|
||
| # Logs Drilldown이 우선 참조하는 service_name 라벨도 함께 맞춥니다. | ||
| - sourceLabels: | ||
| - service | ||
| targetLabel: service_name | ||
|
|
||
| # 서비스 네임스페이스는 워크로드 네임스페이스와 동일하게 둡니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_namespace | ||
| targetLabel: service_namespace | ||
|
|
||
| # job은 namespace/service 형식으로 설정합니다. | ||
| - sourceLabels: | ||
| - __meta_kubernetes_namespace | ||
| - service | ||
| separator: / | ||
| targetLabel: job | ||
|
|
||
| {{- end }} | ||
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
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
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
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 126
🏁 Script executed:
fd "podlogs.yaml" -type fRepository: PinHouse/PinHouse_CLOUD
Length of output: 237
🏁 Script executed:
git ls-files | grep -i podlogRepository: PinHouse/PinHouse_CLOUD
Length of output: 124
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 2826
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 49
🏁 Script executed:
# Check other template files for comparison ls -la ./k8s-helm/releases/monitoring-alloy/templates/Repository: PinHouse/PinHouse_CLOUD
Length of output: 239
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 49
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 115
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 226
🏁 Script executed:
Repository: PinHouse/PinHouse_CLOUD
Length of output: 49
🏁 Script executed:
# Check the Chart.yaml for any documentation references cat ./k8s-helm/releases/monitoring-alloy/Chart.yamlRepository: PinHouse/PinHouse_CLOUD
Length of output: 364
이 템플릿을 배포하려면 클러스터에
monitoring.grafana.com/v1alpha2CRD가 필수입니다.현재 1번 줄에서
.Values.podLogs.enabled값만으로 조건을 판단하고 있습니다. 대상 클러스터에 PodLogs CRD가 설치되어 있지 않으면 Helm 설치/업그레이드가 실패합니다..Capabilities.APIVersions.Has같은 가드를 추가하거나, Chart.yaml이나 README에서 필수 전제 조건으로 명시해야 합니다.🧰 Tools
🪛 YAMLlint (1.38.0)
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🤖 Prompt for AI Agents