Skip to content

Commit 8ba4eb5

Browse files
authored
Add the job annotation to all alloy instances and ksm. (#1087)
Make the job annotation configurable again Signed-off-by: Pete Wall <pete.wall@grafana.com>
1 parent 5d348a1 commit 8ba4eb5

File tree

47 files changed

+162
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+162
-1
lines changed

charts/k8s-monitoring/charts/feature-cluster-metrics/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,14 @@
313313
}
314314
}
315315
},
316+
"podAnnotations": {
317+
"type": "object",
318+
"properties": {
319+
"k8s.grafana.com/logs.job": {
320+
"type": "string"
321+
}
322+
}
323+
},
316324
"prometheusScrape": {
317325
"type": "boolean"
318326
},

charts/k8s-monitoring/charts/feature-cluster-metrics/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@ kube-state-metrics:
449449
nodeSelector:
450450
kubernetes.io/os: linux
451451

452+
# @ignored
453+
podAnnotations:
454+
k8s.grafana.com/logs.job: integrations/kubernetes/kube-state-metrics
455+
452456
# @ignored - Enable the release label
453457
releaseLabel: true
454458

charts/k8s-monitoring/charts/feature-pod-logs/templates/_common_pod_discovery.alloy.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ discovery.relabel "filtered_pods" {
4242

4343
// set the job label from the k8s.grafana.com/logs.job annotation if it exists
4444
rule {
45-
source_labels = ["{{ include "pod_annotation" "k8s.grafana.com/logs.job" }}"]
45+
source_labels = ["{{ include "pod_annotation" .Values.annotations.job }}"]
4646
regex = "(.+)"
4747
target_label = "job"
4848
}

charts/k8s-monitoring/docs/examples/auth/bearer-token/output.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/auth/embedded-secrets/output.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/auth/external-secrets/output.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/auth/oauth2/output.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/auth/sigv4/output.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/collector-storage/output.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/destinations/otlp-gateway/output.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)