Skip to content

[ws-manager-mk2] Maintenance mode #16702

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

Merged
merged 4 commits into from
Mar 9, 2023
Merged

[ws-manager-mk2] Maintenance mode #16702

merged 4 commits into from
Mar 9, 2023

Conversation

WVerlaek
Copy link
Member

@WVerlaek WVerlaek commented Mar 7, 2023

Description

Add maintenance mode for ws-manager-mk2:

  • Create ws-manager-mk2-maintenance-mode ConfigMap, which contains a boolean that enables/disables maintenance mode.
    • This ConfigMap is deployed by the installer
  • Create a new maintenance reconciler that watches this ConfigMap for changes, and keeps track of whether maintenance mode is enabled
    • The controller manager only watches the maintenance ConfigMap events using a label filter
  • The API service returns FailedPrecondition on the following requests when maintenance mode is enabled:
    • StartWorkspace
    • StopWorkspace
    • TakeSnapshot
  • The workspace reconciler stops reconciling in maintenance mode, to prevent starting a workspace shutdown and triggering a backup
    • Any events during maintenance mode get requeued after a minute, such that we do quickly reconcile again when maintenance mode ends

Related Issue(s)

Part of #11416

How to test

In this preview env:

  • Start a workspace
  • Edit the ws-manager-mk2-maintenance-mode ConfigMap and enable maintenance mode
  • Try starting a new workspace, stopping the existing workspace, or taking a snapshot, and observe these operations fail
  • Restart ws-manager-mk2 and observe it stays in maintenance mode
  • Disable maintenance mode again
  • Try the above operations which should now succeed

Release Notes

NONE

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@WVerlaek WVerlaek requested a review from a team March 7, 2023 09:17
@WVerlaek WVerlaek self-assigned this Mar 7, 2023
@WVerlaek WVerlaek force-pushed the wv/mk2-maintenance-mode branch 2 times, most recently from 48aa5f8 to 8787605 Compare March 8, 2023 13:33
@WVerlaek WVerlaek force-pushed the wv/mk2-maintenance-mode branch from 8755b4e to a3f928f Compare March 9, 2023 13:25
@WVerlaek WVerlaek requested a review from Furisto March 9, 2023 13:25
@roboquat roboquat merged commit 25220bb into main Mar 9, 2023
@roboquat roboquat deleted the wv/mk2-maintenance-mode branch March 9, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants