Categorysigs.k8s.io/controller-runtime
modulepackage
0.20.2
Repository: https://github.com/kubernetes-sigs/controller-runtime.git
Documentation: pkg.go.dev

# README

Go Report Card godoc

Kubernetes controller-runtime Project

The Kubernetes controller-runtime Project is a set of go libraries for building Controllers. It is leveraged by Kubebuilder and Operator SDK. Both are a great place to start for new projects. See Kubebuilder's Quick Start to see how it can be used.

Documentation:

Versioning, Maintenance, and Compatibility

The full documentation can be found at VERSIONING.md, but TL;DR:

Users:

  • We follow Semantic Versioning (semver)
  • Use releases with your dependency management to ensure that you get compatible code
  • The main branch contains all the latest code, some of which may break compatibility (so "normal" go get is not recommended)

Contributors:

Compatibility

Every minor version of controller-runtime has been tested with a specific minor version of client-go. A controller-runtime minor version may be compatible with other client-go minor versions, but this is by chance and neither supported nor tested. In general, we create one minor version of controller-runtime for each minor version of client-go and other k8s.io/* dependencies.

The minimum Go version of controller-runtime is the highest minimum Go version of our Go dependencies. Usually, this will be identical to the minimum Go version of the corresponding k8s.io/* dependencies.

Compatible k8s.io/*, client-go and minimum Go versions can be looked up in our go.mod file.

k8s.io/*, client-gominimum Go version
CR v0.20v0.321.23
CR v0.19v0.311.22
CR v0.18v0.301.22
CR v0.17v0.291.21
CR v0.16v0.281.20
CR v0.15v0.271.20

FAQ

See FAQ.md

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

controller-runtime is a subproject of the kubebuilder project in sig apimachinery.

You can reach the maintainers of this project at:

Contributing

Contributions are greatly appreciated. The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers. The project follows the typical GitHub pull request model. See CONTRIBUTING.md for more details. Before starting any work, please either comment on an existing issue, or file a new one.

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

# Packages

No description provided by the author
No description provided by the author
Package pkg provides libraries for building Controllers.

# Variables

CreateOrUpdate creates or updates the given object obj in the Kubernetes cluster.
GetConfig creates a *rest.Config for talking to a Kubernetes apiserver.
GetConfigOrDie creates a *rest.Config for talking to a Kubernetes apiserver.
Log is the base logger used by controller-runtime.
LoggerFrom returns a logger with predefined values from a context.Context.
LoggerInto takes a context and sets the logger as one of its keys.
NewControllerManagedBy returns a new controller builder that will be started by the provided Manager.
NewManager returns a new Manager for creating Controllers.
NewWebhookManagedBy returns a new webhook builder that will be started by the provided Manager.
RegisterFlags registers flag variables to the given FlagSet if not already registered.
SetControllerReference sets owner as a Controller OwnerReference on owned.
SetLogger sets a concrete logging implementation for all deferred Loggers.
SetupSignalHandler registers for SIGTERM and SIGINT.

# Type aliases

Builder builds an Application ControllerManagedBy (e.g.
GroupResource specifies a Group and a Resource, but does not force a version.
GroupVersion contains the "group" and the "version", which uniquely identifies the API.
Manager initializes shared dependencies such as Caches and Clients, and provides them to Runnables.
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
Options are the arguments for creating a new Manager.
Request contains the information necessary to reconcile a Kubernetes object.
Result contains the result of a Reconciler invocation.
SchemeBuilder builds a new Scheme for mapping go types to Kubernetes GroupVersionKinds.
TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version.