File tree Expand file tree Collapse file tree 11 files changed +18
-15
lines changed Expand file tree Collapse file tree 11 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ const (
4646 // encountered an error during the reconcile process or it has made insufficient progress (timeout).
4747 // The Condition adheres to an "abnormal-true" polarity pattern, and MUST only be present on the resource if the
4848 // Condition is True.
49+ // For more information about polarity patterns, see:
50+ // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
4951 StalledCondition string = "Stalled"
5052
5153 // ReconcilingCondition indicates the controller is currently working on reconciling the latest changes. This MAY be
5254 // True for multiple reconciliation attempts, e.g. when an transient error occurred.
5355 // The Condition adheres to an "abnormal-true" polarity pattern, and MUST only be present on the resource if the
5456 // Condition is True.
57+ // For more information about polarity patterns, see:
58+ // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
5559 ReconcilingCondition string = "Reconciling"
5660)
5761
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const (
4444//
4545// // Get a runtime Kubernetes client configuration with the options set
4646// restConfig := client.GetConfigOrDie(clientOptions)
47- // }
47+ // }
4848type Options struct {
4949 // QPS indicates the maximum queries-per-second of requests sent to to the Kubernetes API, defaults to 20.
5050 QPS float32
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- // Package controller offers embeddable structs for usage in your controller and underlying reconcilers, to help with
17+ // Package controller offers embeddable structs for use in your controller and underlying reconcilers, to help with
1818// conforming to GitOps Toolkit conventions.
1919package controller
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ type Metrics struct {
5555// MustMakeMetrics creates a new Metrics with a new metrics.Recorder, and the Metrics.Scheme set to that of the given
5656// mgr.
5757// It attempts to register the metrics collectors in the controller-runtime metrics registry, which panics upon the
58- // first registration that causes an error. Which usually happens if you try to initialize a Metrics value twice for
58+ // first registration that causes an error. Which usually happens if you try to initialise a Metrics value twice for
5959// your controller.
6060func MustMakeMetrics (mgr ctrl.Manager ) Metrics {
6161 metricsRecorder := metrics .NewRecorder ()
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const (
5454// RenewDeadline: &leaderElectionOptions.RenewDeadline,
5555// RetryPeriod: &leaderElectionOptions.RetryPeriod,
5656// })
57- // }
57+ // }
5858type Options struct {
5959 // Enable determines whether or not to use leader election when starting the manager.
6060 Enable bool
Original file line number Diff line number Diff line change @@ -39,9 +39,8 @@ var levelStrings = map[string]zapcore.Level{
3939 "error" : zapcore .ErrorLevel ,
4040}
4141
42- // These are for convenience when doing log.V(...) to log at a
43- // particular level. They correspond to the logr equivalents of the
44- // zap levels above.
42+ // These are for convenience when doing log.V(...) to log at a particular level. They correspond to the logr
43+ // equivalents of the zap levels above.
4544const (
4645 TraceLevel = 2
4746 DebugLevel = 1
@@ -72,7 +71,7 @@ var stackLevelStrings = map[string]zapcore.Level{
7271//
7372// // Use the values during the initialisation of the logger
7473// ctrl.SetLogger(logger.NewLogger(logOptions))
75- // }
74+ // }
7675type Options struct {
7776 LogEncoding string
7877 LogLevel string
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ import (
5757// return ctrl.Result{}, client.IgnoreNotFound(err)
5858// }
5959//
60- // // Initialize the patch helper
60+ // // Initialise the patch helper
6161// patchHelper, err := patch.NewHelper(obj, r.Client)
6262// if err != nil {
6363// return ctrl.Result{}, err
@@ -131,7 +131,7 @@ type Helper struct {
131131 isConditionsSetter bool
132132}
133133
134- // NewHelper returns an initialized Helper.
134+ // NewHelper returns an initialised Helper.
135135func NewHelper (obj client.Object , crClient client.Client ) (* Helper , error ) {
136136 // Get the GroupVersionKind of the object,
137137 // used to validate against later on.
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ var endpoints = map[string]http.Handler{
4343
4444// SetupHandlers registers the pprof endpoints on the metrics server of the given mgr.
4545//
46- // The func can be used in the main.go file of your, after initialisation of the manager:
46+ // The func can be used in the main.go file of your controller , after initialisation of the manager:
4747//
4848// func main() {
4949// mgr, err := ctrl.NewManager(cfg, ctrl.Options{})
@@ -52,7 +52,7 @@ var endpoints = map[string]http.Handler{
5252// os.Exit(1)
5353// }
5454// pprof.SetupHandlers(mgr, log)
55- // }
55+ // }
5656func SetupHandlers (mgr ctrl.Manager , log logr.Logger ) {
5757 // Only set the fraction if there is no existing setting
5858 if runtime .SetMutexProfileFraction (- 1 ) == 0 {
Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- // Package predicates provides generic predicates for GitOps Toolkit components to filter events conform standards .
17+ // Package predicates provides generic controller-runtime predicates for GitOps Toolkit components to filter events.
1818package predicates
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import (
2626
2727// SetupChecks configures simple default ready and health probes on the given mgr.
2828//
29- // The func can be used in the main.go file of your, after initialisation of the manager:
29+ // The func can be used in the main.go file of your controller , after initialisation of the manager:
3030//
3131// func main() {
3232// mgr, err := ctrl.NewManager(cfg, ctrl.Options{})
You can’t perform that action at this time.
0 commit comments