102 lines
2.2 KiB
YAML
102 lines
2.2 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: otel-lab-collector-config
|
|
namespace: monitoring
|
|
data:
|
|
config.yaml: |
|
|
receivers:
|
|
otlp:
|
|
protocols:
|
|
grpc:
|
|
endpoint: 0.0.0.0:4317
|
|
http:
|
|
endpoint: 0.0.0.0:4318
|
|
processors:
|
|
memory_limiter:
|
|
check_interval: 1s
|
|
limit_mib: 128
|
|
spike_limit_mib: 32
|
|
batch:
|
|
exporters:
|
|
otlp:
|
|
endpoint: otel-lab-tempo.monitoring.svc:4317
|
|
tls:
|
|
insecure: true
|
|
service:
|
|
pipelines:
|
|
traces:
|
|
receivers: [otlp]
|
|
processors: [memory_limiter, batch]
|
|
exporters: [otlp]
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: otel-lab-collector
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: otel-lab-collector
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: otel-lab-collector
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: collector
|
|
image: otel/opentelemetry-collector:0.120.0
|
|
args: ["--config=/conf/config.yaml"]
|
|
ports:
|
|
- name: otlp-grpc
|
|
containerPort: 4317
|
|
- name: otlp-http
|
|
containerPort: 4318
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: otlp-http
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: 25m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 250m
|
|
memory: 192Mi
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /conf
|
|
readOnly: true
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: otel-lab-collector-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: otel-lab-collector
|
|
namespace: monitoring
|
|
spec:
|
|
selector:
|
|
app: otel-lab-collector
|
|
ports:
|
|
- name: otlp-grpc
|
|
port: 4317
|
|
targetPort: otlp-grpc
|
|
- name: otlp-http
|
|
port: 4318
|
|
targetPort: otlp-http
|