apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-hostfs-daemonset
namespace: <namespace>
# ...
---
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
allowHostDirVolumePlugin: true
allowHostIPC: false
allowHostNetwork: false
allowHostPID: true
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: true
allowedCapabilities: null
defaultAddCapabilities:
- SYS_ADMIN
fsGroup:
type: RunAsAny
groups: []
metadata:
name: otel-hostmetrics
readOnlyRootFilesystem: true
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:<namespace>:otel-hostfs-daemonset
volumes:
- configMap
- emptyDir
- hostPath
- projected
# ...
---
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: otel
namespace: <namespace>
spec:
serviceAccount: otel-hostfs-daemonset
mode: daemonset
volumeMounts:
- mountPath: /hostfs
name: host
readOnly: true
volumes:
- hostPath:
path: /
name: host
config:
receivers:
hostmetrics:
collection_interval: 10s
initial_delay: 1s
root_path: /
scrapers:
cpu: {}
memory: {}
disk: {}
service:
pipelines:
metrics:
receivers: [hostmetrics]
# ...
apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-hostfs-daemonset
namespace: <namespace>
---
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
allowHostDirVolumePlugin: true
allowHostIPC: false
allowHostNetwork: false
allowHostPID: true
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: true
allowedCapabilities: null
defaultAddCapabilities:
- SYS_ADMIN
fsGroup:
type: RunAsAny
groups: []
metadata:
name: otel-hostmetrics
readOnlyRootFilesystem: true
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:<namespace>:otel-hostfs-daemonset
volumes:
- configMap
- emptyDir
- hostPath
- projected
---
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: otel
namespace: <namespace>
spec:
serviceAccount: otel-hostfs-daemonset
mode: daemonset
volumeMounts:
- mountPath: /hostfs
name: host
readOnly: true
volumes:
- hostPath:
path: /
name: host
config:
receivers:
hostmetrics:
collection_interval: 10s
1
initial_delay: 1s
2
root_path: /
3
scrapers:
4
cpu: {}
memory: {}
disk: {}
service:
pipelines:
metrics:
receivers: [hostmetrics]
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow