opentelemetry-operator

module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0

README

Continuous Integration Go Report Card GoDoc Maintainability codecov

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, run:

kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/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:

    processors:
      queued-retry:

    exporters:
      logging:

    pipelines:
      traces:
        receivers: [jaeger]
        processors: [queued-retry]
        exporters: [logging]
EOF

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.

Directories

Path Synopsis
cmd
manager command
pkg
apis/opentelemetry/v1alpha1
Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=opentelemetry.io Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=opentelemetry.io
Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=opentelemetry.io Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=opentelemetry.io
tests

Jump to

Keyboard shortcuts

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