-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be4f8b9
commit eb0ddbc
Showing
6 changed files
with
296 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: otel-collector-conf | ||
labels: | ||
app: opentelemetry | ||
component: otel-collector-conf | ||
data: | ||
otel-collector-config: | | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:4318 | ||
processors: | ||
batch: | ||
memory_limiter: | ||
# 80% of maximum memory up to 2G | ||
limit_mib: 1500 | ||
# 25% of limit up to 2G | ||
spike_limit_mib: 512 | ||
check_interval: 5s | ||
extensions: | ||
zpages: {} | ||
exporters: | ||
prometheus: | ||
endpoint: 0.0.0.0:8889 | ||
namespace: '' | ||
logging: {} | ||
service: | ||
extensions: [zpages] | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [memory_limiter, batch] | ||
exporters: [logging] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [memory_limiter, batch] | ||
exporters: [logging, prometheus] | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: otel-collector | ||
labels: | ||
app.kubernetes.io/managed-by: paas | ||
app.kubernetes.io/name: opentelemetry | ||
app: opentelemetry | ||
component: otel-collector | ||
spec: | ||
ports: | ||
- name: otlp-grpc # Default endpoint for OpenTelemetry gRPC receiver. | ||
port: 4317 | ||
protocol: TCP | ||
targetPort: 4317 | ||
- name: otlp-http # Default endpoint for OpenTelemetry HTTP receiver. | ||
port: 4318 | ||
protocol: TCP | ||
targetPort: 4318 | ||
- name: metrics # Default endpoint for querying metrics. | ||
port: 8888 | ||
- name: prometheus | ||
port: 8889 | ||
|
||
type: NodePort | ||
selector: | ||
component: otel-collector | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: otel-collector | ||
labels: | ||
app: opentelemetry | ||
component: otel-collector | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: opentelemetry | ||
component: otel-collector | ||
minReadySeconds: 5 | ||
progressDeadlineSeconds: 120 | ||
replicas: {{ .Values.otel.replicas }} | ||
template: | ||
metadata: | ||
labels: | ||
app: opentelemetry | ||
component: otel-collector | ||
spec: | ||
containers: | ||
- command: | ||
- "/otelcol" | ||
- "--config=/conf/otel-collector-config.yaml" | ||
image: {{ .Values.otel.image.repository }}:{{ .Values.otel.image.tag }} | ||
name: otel-collector | ||
resources: | ||
limits: | ||
cpu: 1 | ||
memory: 2Gi | ||
requests: | ||
cpu: 200m | ||
memory: 400Mi | ||
ports: | ||
- containerPort: 55679 # Default endpoint for ZPages. | ||
- containerPort: 4317 # Default endpoint for OpenTelemetry receiver. | ||
- containerPort: 14250 # Default endpoint for Jaeger gRPC receiver. | ||
- containerPort: 14268 # Default endpoint for Jaeger HTTP receiver. | ||
- containerPort: 9411 # Default endpoint for Zipkin receiver. | ||
- containerPort: 8888 # Default endpoint for querying metrics. | ||
- containerPort: 8889 # Default endpoint for Prometheus. | ||
env: | ||
- name: MY_POD_IP | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: status.podIP | ||
- name: GOMEMLIMIT | ||
value: 1600MiB | ||
volumeMounts: | ||
- name: otel-collector-config-vol | ||
mountPath: /conf | ||
# - name: otel-collector-secrets | ||
# mountPath: /secrets | ||
volumes: | ||
- configMap: | ||
name: otel-collector-conf | ||
items: | ||
- key: otel-collector-config | ||
path: otel-collector-config.yaml | ||
name: otel-collector-config-vol | ||
# - secret: | ||
# name: otel-collector-secrets | ||
# items: | ||
# - key: cert.pem | ||
# path: cert.pem | ||
# - key: key.pem | ||
# path: key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.