@@ -23,13 +23,14 @@ limitations under the License.
23
23
// and uncommon cases should be possible. In general, controller-runtime tries
24
24
// to guide users towards Kubernetes controller best-practices.
25
25
//
26
- // Getting Started
26
+ // # Getting Started
27
27
//
28
28
// The main entrypoint for controller-runtime is this root package, which
29
29
// contains all of the common types needed to get started building controllers:
30
- // import (
31
- // ctrl "sigs.k8s.io/controller-runtime"
32
- // )
30
+ //
31
+ // import (
32
+ // ctrl "sigs.k8s.io/controller-runtime"
33
+ // )
33
34
//
34
35
// The examples in this package walk through a basic controller setup. The
35
36
// kubebuilder book (https://book.kubebuilder.io) has some more in-depth
@@ -38,7 +39,7 @@ limitations under the License.
38
39
// controller-runtime favors structs with sane defaults over constructors, so
39
40
// it's fairly common to see structs being used directly in controller-runtime.
40
41
//
41
- // Organization
42
+ // # Organization
42
43
//
43
44
// A brief-ish walkthrough of the layout of this library can be found below. Each
44
45
// package contains more information about how to use it.
@@ -47,7 +48,7 @@ limitations under the License.
47
48
// controllers can be found at
48
49
// https://github.com/kubernetes-sigs/controller-runtime/blob/master/FAQ.md.
49
50
//
50
- // Managers
51
+ // # Managers
51
52
//
52
53
// Every controller and webhook is ultimately run by a Manager (pkg/manager). A
53
54
// manager is responsible for running controllers and webhooks, and setting up
@@ -56,7 +57,7 @@ limitations under the License.
56
57
// generally configured to gracefully shut down controllers on pod termination
57
58
// by wiring up a signal handler (pkg/manager/signals).
58
59
//
59
- // Controllers
60
+ // # Controllers
60
61
//
61
62
// Controllers (pkg/controller) use events (pkg/event) to eventually trigger
62
63
// reconcile requests. They may be constructed manually, but are often
@@ -67,15 +68,15 @@ limitations under the License.
67
68
// trigger reconciles. There are pre-written utilities for the common cases, and
68
69
// interfaces and helpers for advanced cases.
69
70
//
70
- // Reconcilers
71
+ // # Reconcilers
71
72
//
72
73
// Controller logic is implemented in terms of Reconcilers (pkg/reconcile). A
73
74
// Reconciler implements a function which takes a reconcile Request containing
74
75
// the name and namespace of the object to reconcile, reconciles the object,
75
76
// and returns a Response or an error indicating whether to requeue for a
76
77
// second round of processing.
77
78
//
78
- // Clients and Caches
79
+ // # Clients and Caches
79
80
//
80
81
// Reconcilers use Clients (pkg/client) to access API objects. The default
81
82
// client provided by the manager reads from a local shared cache (pkg/cache)
@@ -91,19 +92,19 @@ limitations under the License.
91
92
// may retrieve event recorders (pkg/recorder) to emit events using the
92
93
// manager.
93
94
//
94
- // Schemes
95
+ // # Schemes
95
96
//
96
97
// Clients, Caches, and many other things in Kubernetes use Schemes
97
98
// (pkg/scheme) to associate Go types to Kubernetes API Kinds
98
99
// (Group-Version-Kinds, to be specific).
99
100
//
100
- // Webhooks
101
+ // # Webhooks
101
102
//
102
103
// Similarly, webhooks (pkg/webhook/admission) may be implemented directly, but
103
104
// are often constructed using a builder (pkg/webhook/admission/builder). They
104
105
// are run via a server (pkg/webhook) which is managed by a Manager.
105
106
//
106
- // Logging and Metrics
107
+ // # Logging and Metrics
107
108
//
108
109
// Logging (pkg/log) in controller-runtime is done via structured logs, using a
109
110
// log set of interfaces called logr
@@ -117,7 +118,7 @@ limitations under the License.
117
118
// serve these by an HTTP endpoint, and additional metrics may be registered to
118
119
// this Registry as normal.
119
120
//
120
- // Testing
121
+ // # Testing
121
122
//
122
123
// You can easily build integration and unit tests for your controllers and
123
124
// webhooks using the test Environment (pkg/envtest). This will automatically
0 commit comments