operator-toolkit provides framework and tools to help implement kubernetes operators.
controller package provides tools to implement certain controller patterns.
controller/compositepackage contains interface and types to implement the composite controller pattern.controller/syncpackage contains interface and types to implement sync controller pattern.controller/external-object-syncpackage uses the sync pattern as the base and adds a garbage collector for collecting the orphan objects in external system.controller/metadata-syncpackage uses the sync pattern as the base and adds a resync to periodically sync object metadata between systems.controller/externalpackage 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 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 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/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/export package provides opentelemetry exporters that can be used to
enable telemetry in an operator.
-
webhook/certpackage 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/admissionpackage 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.