-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance RunnerSet to optionally retain PVs accross restarts #1340
Conversation
45334c8
to
be40479
Compare
looks very promising indeed, although I don't see how acceptance/testdata converts into an actual test of this implementation. |
@erplsf What do you mean by "actual test of this implementation"? It's used as a part of |
be40479
to
c815c00
Compare
This is our initial attempt to bring back the ability to retain PVs across runner pod restarts when using RunnerSet. The implementation is composed of two new controllers, `runnerpersistentvolumeclaim-controller` and `runnerpersistentvolume-controller`. It all starts from our existing `runnerset-controller`. The controller now tries to mark any PVCs created by StatefulSets created for the RunnerSet. Once the controller terminated statefulsets, their corresponding PVCs are clean up by `runnerpersistentvolumeclaim-controller`, then PVs are unbound from their corresponding PVCs by `runnerpersistentvolume-controller` so that they can be reused by future PVCs createf for future StatefulSets that shares the same same StorageClass. Ref #1286
…nnerSet + PVs Ref #1286
c815c00
to
6997357
Compare
Merging this anyway so that you can test the |
) | ||
|
||
// RunnerPersistentVolumeReconciler reconciles a PersistentVolume object | ||
type RunnerPersistentVolumeReconciler struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is watching PersistentVolume
s necessary? Should it be up to the PV controller to decide how to reclaim/recreate when PVs the PVC is deleted.
return ctrl.Result{}, client.IgnoreNotFound(err) | ||
} | ||
|
||
log.Info("Reconciling runner pvc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* doc: Use RunnerSet to retain various cache In relation to #1286 and as a follow-up for #1340 * docs: clarify client vs daemon * docs: better wording * Separate RunnerSet examples for docker iimage layer caching * Revert changes on testdata as it is going to be added via #1471 instead * Update README.md Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com> * fixup! Update README.md * Remove the outdated RunnerSet limitation Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>
…1464) * doc: Use RunnerSet to retain various cache In relation to actions#1286 and as a follow-up for actions#1340 * docs: clarify client vs daemon * docs: better wording * Separate RunnerSet examples for docker iimage layer caching * Revert changes on testdata as it is going to be added via actions#1471 instead * Update README.md Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com> * fixup! Update README.md * Remove the outdated RunnerSet limitation Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com>
This is my initial attempt to bring back the ability to retain PVs across runner pod restarts when using RunnerSet.
The implementation is composed of two new controllers,
runnerpersistentvolumeclaim-controller
andrunnerpersistentvolume-controller
.It all starts from our existing
runnerset-controller
. The controller now tries to mark any PVCs created by StatefulSets created for the RunnerSet.Once the controller terminated statefulsets, their corresponding PVCs are clean up by
runnerpersistentvolumeclaim-controller
. Shortly after that, PVs are unbound from their corresponding PVCs byrunnerpersistentvolume-controller
so that they can be reused by future PVCs created for future StatefulSets that share the same StorageClass.Ref #1286