Skip to content

Commit

Permalink
Merge pull request #1425 from toonsevrin/book-v2
Browse files Browse the repository at this point in the history
Added note to cronjob book docs explaining the childjob index
  • Loading branch information
k8s-ci-robot committed Mar 11, 2020
2 parents 9f48444 + ec3a9b3 commit e71bd65
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ func (r *CronJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
}

/*
<aside class="note">
<h1>What is this index about?</h1>
<p>The reconciler fetches all jobs owned by the cronjob for the status. As our number of cronjobs increases,
looking these up can become quite slow as we have to filter through all of them. For a more efficient lookup,
these jobs will be indexed locally on the controller's name. A jobOwnerKey field is added to the
cached job objects. This key references the owning controller and functions as the index. Later in this
document we will configure the manager to actually index this field.</p>
</aside>
Once we have all the jobs we own, we'll split them into active, successful,
and failed jobs, keeping track of the most recent run so that we can record it
in status. Remember, status should be able to be reconstituted from the state
Expand Down

0 comments on commit e71bd65

Please sign in to comment.