Skip to content

Commit

Permalink
fix: correctly report Cluster's name and uid
Browse files Browse the repository at this point in the history
  • Loading branch information
xuewei authored and xueweiz committed Nov 4, 2024
1 parent 62529b1 commit c40e177
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agent
description: Chart to install K8s collection stack based on Observe Agent
type: application
version: 0.28.1
version: 0.28.2
appVersion: "1.1.0"
dependencies:
- name: opentelemetry-collector
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agent

![Version: 0.28.1](https://img.shields.io/badge/Version-0.28.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 0.28.2](https://img.shields.io/badge/Version-0.28.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)

> [!CAUTION]
> This chart is under active development and is not meant to be installed yet.
Expand Down
4 changes: 2 additions & 2 deletions charts/agent/templates/_cluster-events-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ processors:
# identifiers
- set(attributes["observe_transform"]["identifiers"]["clusterName"], resource.attributes["k8s.cluster.name"])
- set(attributes["observe_transform"]["identifiers"]["clusterUid"], resource.attributes["k8s.cluster.uid"])
- set(attributes["observe_transform"]["identifiers"]["uid"], attributes["k8s.cluster.uid"])
- set(attributes["observe_transform"]["identifiers"]["uid"], resource.attributes["k8s.cluster.uid"])
- set(attributes["observe_transform"]["identifiers"]["kind"], "Cluster")
- set(attributes["observe_transform"]["identifiers"]["name"], attributes["k8s.cluster.name"])
- set(attributes["observe_transform"]["identifiers"]["name"], resource.attributes["k8s.cluster.name"])
# facets
- set(attributes["observe_transform"]["facets"]["creationTimestamp"], body["metadata"]["creationTimestamp"])
- set(attributes["observe_transform"]["facets"]["labels"], body["metadata"]["labels"])
Expand Down
4 changes: 3 additions & 1 deletion integration/scripts/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def test_errors_logs(kube_client, helm_config):
# Sometimes the container operator of filelog doesn't understand the logs' format
# This most likely happens when the log is corrupted or in a weird state
# Let's prevent these errors from blocking integration tests.
"failed to detect a valid container log format: entry cannot be parsed as container logs"
"failed to detect a valid container log format: entry cannot be parsed as container logs",
# containerID is empty when a container is just created.
" has an empty containerID"
]
expected_good_logs = [
"Starting observe-agent"
Expand Down

0 comments on commit c40e177

Please sign in to comment.