0119同步
This commit is contained in:
60
OpenTelemetry/Collector_v2/03-otel-gateway-deployment.yaml
Normal file
60
OpenTelemetry/Collector_v2/03-otel-gateway-deployment.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
# 部署主体 (Deployment)
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: otel-gateway
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: otel-gateway
|
||||
spec:
|
||||
replicas: 1 # 采集 Events 和 KSM 建议单副本,避免数据重复
|
||||
selector:
|
||||
matchLabels:
|
||||
app: otel-gateway
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: otel-gateway
|
||||
spec:
|
||||
serviceAccountName: otel-gateway
|
||||
containers:
|
||||
- name: otel-collector
|
||||
image: otel/opentelemetry-collector-contrib:latest
|
||||
command:
|
||||
- "/otelcol-contrib"
|
||||
args:
|
||||
- "--config=/conf/config.yaml"
|
||||
volumeMounts:
|
||||
- name: config-vol
|
||||
mountPath: /conf
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 400Mi
|
||||
volumes:
|
||||
- name: config-vol
|
||||
configMap:
|
||||
name: otel-gateway-config
|
||||
---
|
||||
# 服务暴露 (Service)
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: otel-gateway
|
||||
namespace: monitoring
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: otel-gateway
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 4317
|
||||
targetPort: 4317
|
||||
protocol: TCP
|
||||
- name: http
|
||||
port: 4318
|
||||
targetPort: 4318
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user