Skip to content

Commit

Permalink
feat: deploy OTEL collecor
Browse files Browse the repository at this point in the history
  • Loading branch information
locmai committed Jul 23, 2022
1 parent 52c1c59 commit 268f0cd
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 209 deletions.
231 changes: 33 additions & 198 deletions system/templates/opentelemetry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,33 @@ spec:
source:
chart: opentelemetry-collector
repoURL: https://open-telemetry.github.io/opentelemetry-helm-charts
targetRevision: 0.17.0
targetRevision: 0.23.0
helm:
releaseName: opentelemetry-collector
values: |
resources:
limits:
cpu: 0.2
memory: 0.1Gi
config:
exporters:
logging: {}
prometheus:
endpoint: "0.0.0.0:9090"
send_timestamps: true
metric_expiration: 180m
resource_to_telemetry_conversion:
enabled: false
jaeger:
endpoint: jaeger-collector.observability.svc:14250
tls:
insecure: true
extensions:
health_check: {}
memory_ballast: {}
processors:
batch: {}
# If set to null, will be overridden with values based on k8s resource limits
memory_limiter: null
receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_http:
endpoint: 0.0.0.0:14268
thrift_compact:
endpoint: 0.0.0.0:6831
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
prometheus:
config:
scrape_configs:
- job_name: opentelemetry-collector
scrape_interval: 10s
static_configs:
- targets:
- ${MY_POD_IP}:8888
statsd:
endpoint: "0.0.0.0:8127"
aggregation_interval: 5s
enable_metric_type: true
is_monotonic_counter: true
timer_histogram_mapping:
- statsd_type: "histogram"
observer_type: "gauge"
- statsd_type: "timing"
observer_type: "gauge"
carbon:
endpoint: "0.0.0.0:2003"
transport: tcp
exporters:
loki:
endpoint: http://loki-stack.observability:3100/loki/api/v1/push
tenant_id: "example"
service:
telemetry:
metrics:
Expand All @@ -77,179 +57,34 @@ spec:
- health_check
- memory_ballast
pipelines:
metrics:
logs:
exporters:
- prometheus
- loki
processors:
- memory_limiter
- batch
receivers:
- otlp
- prometheus
traces:
metrics:
exporters:
- jaeger
- prometheus
processors:
- memory_limiter
- batch
receivers:
- otlp
- jaeger
# Shared params for agentCollector daemonset and standaloneCollector deployment pods.
# Can be overridden here or for any component independently using the same keys.
image:
# If you want to use the core image `otel/opentelemetry-collector`, you also need to change `command.name` value to `otelcol`.
repository: otel/opentelemetry-collector-contrib
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
# OpenTelemetry Collector executable
command:
name: otelcol-contrib
extraArgs: []
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
clusterRole:
# Specifies whether a clusterRole should be created
create: false
# Annotations to add to the clusterRole
annotations: {}
# The name of the clusterRole to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# A set of rules as documented here : https://kubernetes.io/docs/reference/access-authn-authz/rbac/
rules: []
# - apiGroups:
# - ''
# resources:
# - 'pods'
# - 'nodes'
# verbs:
# - 'get'
# - 'list'
# - 'watch'
clusterRoleBinding:
# Annotations to add to the clusterRoleBinding
annotations: {}
# The name of the clusterRoleBinding to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podSecurityContext: {}
securityContext: {}
nodeSelector: {}
tolerations: []
affinity: {}
# Allows for pod scheduler prioritisation
# Can be overridden here or for agentCollector and standaloneCollector independently.
priorityClassName: ""
extraEnvs: []
extraConfigMapMounts: []
extraHostPathMounts: []
secretMounts: []
# Configuration for ports, shared between agentCollector, standaloneCollector and service.
# Can be overridden here or for agentCollector and standaloneCollector independently.
- prometheus
- statsd
- carbon
ports:
otlp:
enabled: true
containerPort: 4317
servicePort: 4317
hostPort: 4317
protocol: TCP
otlp-http:
metrics:
enabled: true
containerPort: 4318
servicePort: 4318
hostPort: 4318
containerPort: 8888
servicePort: 8888
protocol: TCP
jaeger-compact:
enabled: true
containerPort: 6831
servicePort: 6831
hostPort: 6831
protocol: UDP
jaeger-thrift:
enabled: true
containerPort: 14268
servicePort: 14268
hostPort: 14268
protocol: TCP
jaeger-grpc:
enabled: true
containerPort: 14250
servicePort: 14250
hostPort: 14250
protocol: TCP
prometheus:
enabled: true
containerPort: 9090
servicePort: 9090
protocol: TCP
# Configuration for agent OpenTelemetry Collector daemonset, enabled by default
agentCollector:
enabled: true
containerLogs:
enabled: false
resources:
limits:
cpu: 256m
memory: 512Mi
# Configuration override that will be merged into the agent's default config
configOverride: {}
# The following config override can be used to enable host receiver
# receivers:
# hostmetrics:
# scrapers:
# cpu:
# disk:
# filesystem:
# service:
# pipelines:
# metrics:
# receivers: [prometheus, hostmetrics]
service:
type: ClusterIP
annotations: {}
podMonitor:
enabled: true
metricsEndpoints:
- port: prometheus
# additional labels for the PodMonitor
extraLabels: {}
# release: kube-prometheus-stack
serviceMonitor:
enabled: false
metricsEndpoints: []
# - port: metrics
# interval: 15s
# additional labels for the ServiceMonitor
extraLabels: {}
# release: kube-prometheus-stack
{{- end }}
5 changes: 0 additions & 5 deletions system/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ dashboard:
namespace: observability
targetRevision: main

opentelemetry:
enabled: false
namespace: observability
logLevel: info

# Ingress / Load balancer
metallb:
enabled: true
Expand Down
5 changes: 0 additions & 5 deletions system/values-stag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ dashboard:
namespace: observability
targetRevision: main

opentelemetry:
enabled: false
namespace: observability
logLevel: info

# Ingress / Load balancer
metallb:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion system/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dashboard:
targetRevision: main

opentelemetry:
enabled: false
enabled: true
namespace: observability
logLevel: info
# TODO Add config.yaml here for templating
Expand Down

0 comments on commit 268f0cd

Please sign in to comment.