Skip to content

Commit

Permalink
Fix a few comments in reconciler-gen (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusthoemmes authored Apr 12, 2021
1 parent 3a2ae6d commit b51994e
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 66 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions client/injection/kube/reconciler/apps/v1/deployment/state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions client/injection/kube/reconciler/core/v1/namespace/state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client/injection/kube/reconciler/core/v1/secret/reconciler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions client/injection/kube/reconciler/core/v1/secret/state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions codegen/cmd/injection-gen/generators/reconciler_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,13 @@ type doReconcile func(ctx {{.contextContext|raw}}, o *{{.type|raw}}) {{.reconcil
// reconcilerImpl implements controller.Reconciler for {{.type|raw}} resources.
type reconcilerImpl struct {
// LeaderAwareFuncs is inlined to help us implement {{.reconcilerLeaderAware|raw}}
// LeaderAwareFuncs is inlined to help us implement {{.reconcilerLeaderAware|raw}}.
{{.reconcilerLeaderAwareFuncs|raw}}
// Client is used to write back status updates.
Client {{.clientsetInterface|raw}}
// Listers index properties about resources
// Listers index properties about resources.
Lister {{.resourceLister|raw}}
// Recorder is an event recorder for recording Event resources to the
Expand Down Expand Up @@ -305,7 +305,7 @@ type reconcilerImpl struct {
{{end}}
}
// Check that our Reconciler implements controller.Reconciler
// Check that our Reconciler implements controller.Reconciler.
var _ controller.Reconciler = (*reconcilerImpl)(nil)
// Check that our generated Reconciler is always LeaderAware.
var _ {{.reconcilerLeaderAware|raw}} = (*reconcilerImpl)(nil)
Expand Down
16 changes: 8 additions & 8 deletions codegen/cmd/injection-gen/generators/reconciler_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,28 @@ func (g *reconcilerStateGenerator) GenerateType(c *generator.Context, t *types.T
var reconcilerStateType = `
// state is used to track the state of a reconciler in a single run.
type state struct {
// Key is the original reconciliation key from the queue.
// key is the original reconciliation key from the queue.
key string
// Namespace is the namespace split from the reconciliation key.
// namespace is the namespace split from the reconciliation key.
namespace string
// Namespace is the name split from the reconciliation key.
// name is the name split from the reconciliation key.
name string
// reconciler is the reconciler.
reconciler Interface
// rof is the read only interface cast of the reconciler.
// roi is the read only interface cast of the reconciler.
roi ReadOnlyInterface
// IsROI (Read Only Interface) the reconciler only observes reconciliation.
// isROI (Read Only Interface) the reconciler only observes reconciliation.
isROI bool
// rof is the read only finalizer cast of the reconciler.
rof ReadOnlyFinalizer
// IsROF (Read Only Finalizer) the reconciler only observes finalize.
// isROF (Read Only Finalizer) the reconciler only observes finalize.
isROF bool
// IsLeader the instance of the reconciler is the elected leader.
// isLeader the instance of the reconciler is the elected leader.
isLeader bool
}
func newState(key string, r *reconcilerImpl) (*state, error) {
// Convert the namespace/name string into a distinct namespace and name
// Convert the namespace/name string into a distinct namespace and name.
namespace, name, err := {{.cacheSplitMetaNamespaceKey|raw}}(key)
if err != nil {
return nil, {{.fmtErrorf|raw}}("invalid resource key: %s", key)
Expand Down

0 comments on commit b51994e

Please sign in to comment.