Skip to content

Commit

Permalink
[agent] use root_path (#1462)
Browse files Browse the repository at this point in the history
* [agent] use root_path to configure the hostmetricsreceiver, instead of environment variables.

* adopt new golden files

* Add more flexibility to the comparison

* correct the root_path inclusion
  • Loading branch information
atoulme authored Sep 27, 2024
1 parent f880599 commit d6a4dee
Show file tree
Hide file tree
Showing 66 changed files with 11,254 additions and 4,386 deletions.
12 changes: 12 additions & 0 deletions .chloggen/fixhostproc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: agent
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: use root_path to configure the hostmetricsreceiver, instead of environment variables.
# One or more tracking issues related to the change
issues: [1462]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ data:
endpoint: 0.0.0.0:8006
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/add-filter-processor/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 5d2f29550b5f6e063b5e8c92402f52f7372806f1c49ba00f4ceb8fe1a397f769
checksum/config: 027386ffe44fc62ab1c5c9cd610804ac063f55d88217b4ffa044ab4bd8ee2908
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -156,19 +156,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ data:
endpoint: 0.0.0.0:8006
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: bb0c15f13f3bf5d9ca1c29d297ea34c04525e8fa525ea8cc8fd52d3c21b8a56d
checksum/config: 02f60daf15591b0cba945440d128fe08dd894b5014e8728440a745fdd5c4b49e
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -156,19 +156,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/add-receiver-creator/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 0bbb52e87b5eed3bb72c08604f22fe14e519c657e71a8209654b6a88e2b9376c
checksum/config: 9dfad555cf71ab338e0ce5c507d98a9b5ffb602f92611c1715f8627a252072d2
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/add-sampler/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 8d670c7dc3c0769487fc8f12ee20e9135d6362dd3db8768af2f583e6d69d249b
checksum/config: cf0d7006bd153187a868afbb3db3e0bb7eaeb8a579ece8b719fd3942b3a85d46
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ data:
endpoint: 0.0.0.0:8006
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/autodetect-istio/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 6ed8fa14514520541e11a1deacdff054b369f8f2b31e40bd3df9a6fcf862bf12
checksum/config: 03ee30d9f761fb5d7b83f1e40a2f36fb23f8f131fdb3e9ea4dc53aab377fef72
kubectl.kubernetes.io/default-container: otel-collector
sidecar.istio.io/inject: "false"
spec:
Expand Down Expand Up @@ -157,19 +157,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/collector-agent-only/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: e8ff4bd9840b9eba07a8591f135ba17cc1b3552fc545ea01513dd05bdec55529
checksum/config: 6b0dad16509fb8ccb7c56535ff022e734d4c96f2331f69cebed7fef53015e33f
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/collector-all-modes/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: cf8fa2fd57ecf87e3f04b3f09f745853f67f6ca091a4c3821898874ebaa7f3fe
checksum/config: 84b6323a09ce75fc5761472c8d889b52a744cf4c454574b25d6e45beb013e1e6
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: ed34eee35c4815041128d28762fae1d40348be36c9a298e1d13858bee6c3901b
checksum/config: c75d1f53f5a8b95d2e5429e84b89d2b21a2ea8369e964aaa7fa78bd9312eb49e
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/crio-logging/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: e8ff4bd9840b9eba07a8591f135ba17cc1b3552fc545ea01513dd05bdec55529
checksum/config: 6b0dad16509fb8ccb7c56535ff022e734d4c96f2331f69cebed7fef53015e33f
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
1 change: 1 addition & 0 deletions examples/default/rendered_manifests/configmap-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ data:
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
15 changes: 1 addition & 14 deletions examples/default/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: e8ff4bd9840b9eba07a8591f135ba17cc1b3552fc545ea01513dd05bdec55529
checksum/config: 6b0dad16509fb8ccb7c56535ff022e734d4c96f2331f69cebed7fef53015e33f
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down Expand Up @@ -115,19 +115,6 @@ spec:
secretKeyRef:
name: default-splunk-otel-collector
key: splunk_observability_access_token
# Env variables for host metrics receiver
- name: HOST_PROC
value: /hostfs/proc
- name: HOST_SYS
value: /hostfs/sys
- name: HOST_ETC
value: /hostfs/etc
- name: HOST_VAR
value: /hostfs/var
- name: HOST_RUN
value: /hostfs/run
- name: HOST_DEV
value: /hostfs/dev
# until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ data:
endpoint: 0.0.0.0:8006
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
Expand Down
Loading

0 comments on commit d6a4dee

Please sign in to comment.