Skip to content

Commit

Permalink
k8app: bugfix: was replace existed system pod matrix when it was alre…
Browse files Browse the repository at this point in the history
…ady existed liable, this cased creation label pod_export

previously it was done by replace in prometheus job
  • Loading branch information
d7561985 committed Nov 10, 2023
1 parent dc429bd commit a6c6eb3
Show file tree
Hide file tree
Showing 2 changed files with 9 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 @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.10
version: 1.1.11

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
12 changes: 8 additions & 4 deletions charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ config:
- delete_key(attributes, "k8s.container.restart_count")
- replace_all_patterns(attributes, "key", "k8s.container.name", "container")
- replace_all_patterns(attributes, "key", "k8s.namespace.name", "namespace")
- replace_all_patterns(attributes, "key", "k8s.pod.name", "instance")
- replace_all_patterns(attributes, "key", "k8s.pod.name", "pod")
- context: log
statements:
- delete_key(attributes, "logtag")
Expand Down Expand Up @@ -336,6 +336,13 @@ config:
from_attribute: k8s.namespace.name
- key: k8s.namespace.name
action: delete
# bugfix: was replace existed system pod matrix when it was already existed liable, this cased creation label pod_export
# previously it was done by replace in prometheus job
- key: namespace
action: update
from_attribute: k8s.pod.name
- key: k8s.pod.name
action: delete
batch:
send_batch_size: 500
send_batch_max_size: 1000
Expand Down Expand Up @@ -511,9 +518,6 @@ prometheus:
- action: replace
source_labels: [__meta_kubernetes_pod_container_name]
target_label: container
- action: replace
source_labels: [__meta_kubernetes_pod_name]
target_label: pod
# # but more importantly to follow grafana notion: <ns>/<container_name>
- action: replace
replacement: "$$1"
Expand Down

0 comments on commit a6c6eb3

Please sign in to comment.