Skip to content

Run cleanup job on each Werft build node #9905

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 1 commit into from
May 11, 2022
Merged

Conversation

mads-hartmann
Copy link
Contributor

@mads-hartmann mads-hartmann commented May 10, 2022

/werft no-preview

Description

This ensure we run the cleanup logic on each build node by splitting the job into two, one to perform the cleanup logic, and one to trigger it for each node.

  1. Renamed platform-clean-up-werft-build-nodes.yaml to platform-clean-up-werft-build-node.yaml (singular) and changed the job spec so that the nodeAffinity is based on a job annotation.
  2. Introduced a new job .werft/platform-trigger-werft-cleanup.yaml which lists all nodes with dev/workload label set to builds and triggers the platform-clean-up-werft-build-node.yaml job for that node.

In a follow up PR we'll change the platform-clean-up-werft-build-node.yaml to cordon the node if it is running too low on disk.

Related Issue(s)

Part of https://github.com/gitpod-io/ops/issues/2050

How to test

As described in the comments in the Werft job specs.

Release Notes

NONE

Documentation

N/A

@mads-hartmann
Copy link
Contributor Author

mads-hartmann commented May 10, 2022

/werft run

👍 started the job as gitpod-build-mads-cleanup-all-nodes.1
(with .werft/ from main)

Copy link
Contributor

@liam-j-bennett liam-j-bennett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@roboquat roboquat merged commit 65dec94 into main May 11, 2022
@roboquat roboquat deleted the mads/cleanup-all-nodes branch May 11, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants