Skip to content

Commit

Permalink
[CHORE] adding missing k8satrribute env var filter
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Takashi <nicolas.takashi@coralogix.com>
  • Loading branch information
nicolastakashi committed Apr 28, 2023
1 parent 7252934 commit 96ecf98
Show file tree
Hide file tree
Showing 36 changed files with 47 additions and 43 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.54.1
version: 0.54.2
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 24dafb062b9bc855fa2147fc89df5ef3832b9c8eb53d05e051c3c1e98b396f9b
checksum/config: 547646417c2e0b705d567d5bec5358bd4b5a20136c80a650347663dd0e2c3b3e

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -23,7 +23,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 75d8cc474889291c54e7ac5b202160e56639b16c98a7fd410dc5d77989dd1b4b
checksum/config: fa2db109356350dd1875fb75a42ba7838be9449d507798b88b02a2457f84fa41

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: f0276a9329ce0dd483f44e983c6d9596a48088657ff27b58314caa7901c73f2e
checksum/config: 01888f1ce4fc258af9b709da29e557cb936a87a0a3275fc589668ca86251c9f8

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: dbc97415f383049daac7d158764f2a23fe68087d87ef8022edd52f2d3f4af0b1
checksum/config: 72c5e4191d932986d1aab8275056797e81490410366c8dfef98e2e3dc054b622

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 830ebfd5939b8e64c64ffbe54f82f921806a7ea39a7bd61758dc68d0b520cb26
checksum/config: b5d2b3114d00584854cdb1cb70ce5be1edc7fe51a5f787f6ef8aaf9fceb2c3b8

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 830ebfd5939b8e64c64ffbe54f82f921806a7ea39a7bd61758dc68d0b520cb26
checksum/config: b5d2b3114d00584854cdb1cb70ce5be1edc7fe51a5f787f6ef8aaf9fceb2c3b8

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -23,7 +23,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 75d8cc474889291c54e7ac5b202160e56639b16c98a7fd410dc5d77989dd1b4b
checksum/config: fa2db109356350dd1875fb75a42ba7838be9449d507798b88b02a2457f84fa41

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand All @@ -23,7 +23,7 @@ spec:
template:
metadata:
annotations:
checksum/config: a52049e216965a760b684506f7deb38a8a5cc60d0984d0f81d1f22950b530395
checksum/config: d12cd7b5d1671e0565a646946c32e890023f8291d132abb778f4f6a4e6d3974b

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-statefulset
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: StatefulSet
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.54.1
helm.sh/chart: opentelemetry-collector-0.54.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.75.0"
Expand Down
4 changes: 4 additions & 0 deletions charts/opentelemetry-collector/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ receivers:
{{- define "opentelemetry-collector.kubernetesAttributesConfig" -}}
processors:
k8sattributes:
{{- if eq .Values.mode "daemonset" }}
filter:
node_from_env_var: K8S_NODE_NAME
{{- end }}
passthrough: false
pod_association:
- sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ containers:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
{{- if .Values.presets.kubeletMetrics.enabled }}
{{- if or .Values.presets.kubeletMetrics.enabled (and .Values.presets.kubernetesAttributes.enabled (eq .Values.mode "daemonset")) }}
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
Expand Down

0 comments on commit 96ecf98

Please sign in to comment.