mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat: allow users to pause prebuilt workspace reconciliation (#18700)
This PR provides two commands: * `coder prebuilds pause` * `coder prebuilds resume` These allow the suspension of all prebuilds activity, intended for use if prebuilds are misbehaving.
This commit is contained in:
@ -474,6 +474,14 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
|
||||
r.Get("/", api.userQuietHoursSchedule)
|
||||
r.Put("/", api.putUserQuietHoursSchedule)
|
||||
})
|
||||
r.Route("/prebuilds", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
api.RequireFeatureMW(codersdk.FeatureWorkspacePrebuilds),
|
||||
)
|
||||
r.Get("/settings", api.prebuildsSettings)
|
||||
r.Put("/settings", api.putPrebuildsSettings)
|
||||
})
|
||||
// The /notifications base route is mounted by the AGPL router, so we can't group it here.
|
||||
// Additionally, because we have a static route for /notifications/templates/system which conflicts
|
||||
// with the below route, we need to register this route without any mounts or groups to make both work.
|
||||
|
Reference in New Issue
Block a user