Skip to content

Commit

Permalink
Adding OTEL collector CRDs and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jurabek committed Feb 4, 2024
1 parent bd3e5a4 commit 90a25de
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/cert-manager/cert-manager/releases/download/v1.14.1/cert-manager.yaml
4 changes: 3 additions & 1 deletion k8s-kustomize/infrastructure/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cert-manager
- gateway
- istio-operator
- istio-operator
- open-telemetry-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- "https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml"
10 changes: 10 additions & 0 deletions k8s-kustomize/infrastructure/monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: monitoring

generatorOptions:
disableNameSuffixHash: true

resources:
- "namespace.yaml"
4 changes: 4 additions & 0 deletions k8s-kustomize/infrastructure/monitoring/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
87 changes: 87 additions & 0 deletions k8s-kustomize/infrastructure/monitoring/otel-collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
endpoint: ${env:MY_POD_IP}:4318
# loki:
# protocols:
# http:
# endpoint: 0.0.0.0:3500
# grpc:
# endpoint: 0.0.0.0:3600
# use_incoming_timestamp: true
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
const_labels:
env: local
otlp:
endpoint: tempo:4317
tls:
insecure: true
logging:
loglevel: debug
loki:
endpoint: http://loki:3100/loki/api/v1/push
otlphttp:
endpoint: "https://collector.gethelios.dev"
traces_endpoint: "https://collector.gethelios.dev/v1/traces"
headers:
Authorization: ${env:HS_API_TOKEN}
otlp/jaeger: # Jaeger supports OTLP directly
endpoint: jaeger-all-in-one:4317
tls:
insecure: true
zipkin:
endpoint: http://zipkin-all-in-one:9411/api/v2/spans
processors:
batch:
attributes:
actions:
- action: insert
key: loki.attribute.labels
value: container
- action: insert
key: loki.format
value: raw
extensions:
health_check:
pprof:
endpoint: :1888
zpages:
endpoint: :55679
service:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp, otlphttp, otlp/jaeger, zipkin]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging, prometheus]
logs:
receivers: [loki]
processors: [attributes]
exporters: [loki]

0 comments on commit 90a25de

Please sign in to comment.