opentelemetry-operator

command module
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

README

Continuous Integration Go Report Card GoDoc Maintainability codecov Repository on Quay

OpenTelemetry Operator for Kubernetes

The OpenTelemetry Operator is an implementation of a Kubernetes Operator.

At this point, it has OpenTelemetry Collector as the only managed component.

Getting started

To install the operator in an existing cluster, make sure you have cert-manager installed and run:

kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml

Once the opentelemetry-operator deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like:

$ kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: simplest
spec:
  config: |
    receivers:
      jaeger:
        protocols:
          grpc:
    processors:
      queued_retry:

    exporters:
      logging:

    service:
      pipelines:
        traces:
          receivers: [jaeger]
          processors: [queued_retry]
          exporters: [logging]
EOF

WARNING: Until the OpenTelemetry Collector format is stable, changes may be required in the above example to remain compatible with the latest version of the OpenTelemetry Collector image being referenced.

This will create an OpenTelemetry Collector instance named simplest, exposing a jaeger-grpc port to consume spans from your instrumented applications and exporting those spans via logging, which writes the spans to the console (stdout) of the OpenTelemetry Collector instance that receives the span.

The config node holds the YAML that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the OpenTelemetry Collector documentation for a reference of the possible entries.

At this point, the Operator does not validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash.

Deployment modes

The CustomResource for the OpenTelemetryCollector exposes a property named .Spec.Mode, which can be used to specify whether the collector should run as a DaemonSet or as a Deployment (default). Look at the examples/daemonset.yaml for reference.

Contributing and Developing

Please see CONTRIBUTING.md.

License

Apache 2.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group.
cmd
Package controllers contains the main controller, where the reconciliation starts.
Package controllers contains the main controller, where the reconciliation starts.
internal
config
Package config contains the operator's runtime configuration.
Package config contains the operator's runtime configuration.
podinjector
Package podinjector contains the webhook that injects sidecars into pods.
Package podinjector contains the webhook that injects sidecars into pods.
version
Package version contains the operator's version, as well as versions of underlying components.
Package version contains the operator's version, as well as versions of underlying components.
pkg
autodetect
Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...).
Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...).
collector
Package collector handles the OpenTelemetry Collector.
Package collector handles the OpenTelemetry Collector.
collector/adapters
Package adapters is for data conversion.
Package adapters is for data conversion.
collector/parser
Package parser is for parsing the OpenTelemetry Collector configuration.
Package parser is for parsing the OpenTelemetry Collector configuration.
collector/reconcile
Package reconcile contains reconciliation logic for OpenTelemetry Collector components.
Package reconcile contains reconciliation logic for OpenTelemetry Collector components.
collector/upgrade
Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next.
Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next.
naming
Package naming is for determining the names for components (containers, services, ...).
Package naming is for determining the names for components (containers, services, ...).
platform
Package platform contains target platforms this operator might run on.
Package platform contains target platforms this operator might run on.
sidecar
Package sidecar contains operations related to sidecar manipulation (add, update, remove).
Package sidecar contains operations related to sidecar manipulation (add, update, remove).
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL