kollect

module
v0.0.0-...-05ee0c8 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0

README

kollect Build Go Reference Go Report Card

Kollect is a collection of applications that used event-based architectures to build monitoring solutions for the resources within your Kubernetes cluster.

Components

Agent

The agent is a Kubernetes Informer implementation that publishes changes in your cluster's resources as events on a configurable event bus.

It uses a dynamic informer that watches over all resource types available to the Service Account provided to the deployment. Message ordering is applied in configurations where it is supported.

Discoverer

The discoverer is used to produce events when certain changes in your clusters occur. For example, a new namespace being created or a new image reference. These can be used to monitor the container images being used etc.

Notifier

The notifier is used to generate notifications to arbitrary recipients when policy failures occur. It currently supports the following notification sinks:

  • Slack
  • Discord
OPA Runner

The OPA runner handles events produced by the agent that evaluates arbitrary OPA policy checks that you define yourself and provide to the application from a configurable blob storage provider. You can see documentation on creating policies within the OPA documentation.

Event Format

Events produced and consumed by these components are defined and serialised using Protocol Buffers. Their definitions can be found in the proto directory at the root of the repository.

Contributing & Testing

Contributions and PRs are welcome!

If you are working locally on this project, you can use the docker-compose file located at the root of the repository to spin up a local version of the components that authenticate via your local kubeconfig file.

Components expose prometheus metrics and pprof endpoints on port 8081. You can also enable tracing (provided by OpenTelemetry) via the TELEMETRY_URL environment variable. Tracing headers are injected into event metadata where supported by the event bus.

Directories

Path Synopsis
cmd
agent
Package main contains the entrypoint to the agent application.
Package main contains the entrypoint to the agent application.
discoverer
Package main contains the entrypoint to the discoverer application.
Package main contains the entrypoint to the discoverer application.
notifier
Package main contains the entrypoint to the notifier application.
Package main contains the entrypoint to the notifier application.
opa-runner
Package main contains the entrypoint to the OPA runner application.
Package main contains the entrypoint to the OPA runner application.
internal
agent
Package agent provides the implementation of the in-cluster agent that reacts to resource changes and sends data to an event bus.
Package agent provides the implementation of the in-cluster agent that reacts to resource changes and sends data to an event bus.
discovery
Package discovery contains types and methods pertaining to the discovery of aspects of a kubernetes cluster.
Package discovery contains types and methods pertaining to the discovery of aspects of a kubernetes cluster.
notifier
Package notifier contains implementations for writing notifications to arbitrary sources based on inbound events.
Package notifier contains implementations for writing notifications to arbitrary sources based on inbound events.
opa
Package opa contains types and functions for performing OPA policy checks against cluster resources.
Package opa contains types and functions for performing OPA policy checks against cluster resources.
pkg
app
Package app provides functions for creating command-line applications
Package app provides functions for creating command-line applications
blob
Package blob contains types and methods for accessing binary data from arbitrary blob storage providers.
Package blob contains types and methods for accessing binary data from arbitrary blob storage providers.
closers
Package closers provides utilities for working with io.Closer implementations.
Package closers provides utilities for working with io.Closer implementations.
diagnostics
Package diagnostics provides functions for enabling diagnostics on the application.
Package diagnostics provides functions for enabling diagnostics on the application.
environment
Package environment contains utilities for interacting with the application's environment.
Package environment contains utilities for interacting with the application's environment.
event
Package event contains utilities for interacting with various event-stream providers.
Package event contains utilities for interacting with various event-stream providers.
flag
Package flag contains types that represent typed command-line flags.
Package flag contains types that represent typed command-line flags.
health
Package health provides functions for reporting the health status of individual components in the application.
Package health provides functions for reporting the health status of individual components in the application.
metrics
Package metrics provides functions for serving and registering prometheus metrics.
Package metrics provides functions for serving and registering prometheus metrics.
telemetry
Package telemetry provides functions for application tracing.
Package telemetry provides functions for application tracing.
proto

Jump to

Keyboard shortcuts

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