Categorygithub.com/ondat/operator-toolkit
module
0.2.0
Repository: https://github.com/ondat/operator-toolkit.git
Documentation: pkg.go.dev

# README

operator-toolkit

PkgGoDev Go Report Card Lint and test License

operator-toolkit provides framework and tools to help implement kubernetes operators.

Packages

controller

controller package provides tools to implement certain controller patterns.

  • controller/composite package contains interface and types to implement the composite controller pattern.
  • controller/sync package contains interface and types to implement sync controller pattern.
  • controller/external-object-sync package uses the sync pattern as the base and adds a garbage collector for collecting the orphan objects in external system.
  • controller/metadata-sync package uses the sync pattern as the base and adds a resync to periodically sync object metadata between systems.
  • controller/external package provides tools for building external controllers with the same core components that a k8s controller uses but for an external system based on non-k8s event source.

operator

operator package provides tools to implement the core business logic of an operator that interacts with the world. An Operand is a unit of work. An Operator can have one or more Operands. The relationship between the Operands is modelled using a Directed Asyclic Graph (DAG). The Operator can be configured to define how the Operands are executed.

declarative

declarative package provides tools to create and transform the kubernetes manifests in a declarative way. It uses kustomize tools to read, organize and transform the manifests with the desired configuration. This helps avoid writing Go structs for all the kubernetes objects and write generic reusable transforms.

rbac

rbac/client package provides a controller-runtime generic client implementation capable of recording the actions performed using the client on the objects and generate RBAC permissions as Role and ClusterRole.

telemetry

telemetry/export package provides opentelemetry exporters that can be used to enable telemetry in an operator.

webhook

  • webhook/cert package provides a local certificate manager that can provision self signed certificate for webhook server, backed by k8s secret for persistence, and refresh certificate when they expire automatically.

  • webhook/admission package provides a consistent way of building admission controllers for k8s native and custom resources with function chaining support.

The above packages can be used together or independently of each other. example/ contains an example of using all the packages together in a kubebuilder based operator.

# Packages

No description provided by the author
Package cache provides a client-go informer based cache that can be populated with any API server objects, not just kubernetes API objects.
No description provided by the author
No description provided by the author
No description provided by the author
The declarative package contains tools for building the manifests that the operators use in a declarative manner.
No description provided by the author
Package error provides interfaces for errors to implement and behavior based error checking helper functions.
No description provided by the author
Package object contains helpers to work with Kubernetes objects.
No description provided by the author
Package predicate defines Predicates used by Controllers to filter Events before they are provided to EventHandlers.
No description provided by the author
No description provided by the author
No description provided by the author
NOTE: Based on https://github.com/kubernetes-sigs/controller-runtime/blob/v0.8.3/pkg/source/source.go, modified to enable running the source when the Kind is not registered with k8s API server.
Package telemetry provides helpers to setup operator telemetry tooling easily.
No description provided by the author