Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

feat(757): Pass disk annotation as toleration and node selector #39

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

Filbird
Copy link
Member

@Filbird Filbird commented Sep 10, 2018

Context

Currently all Screwdriver V4 builds default to a predetermined amount of storage space. We want to offer users the option to configure higher disk space for their builds.

Objective

Pass the annotation beta.screwdriver.cd/disk as a node selector/toleration. Nodes designated to support higher disk space per build will be labeled/tainted with disk=high.

References

screwdriver-cd/screwdriver#757

const diskConfig = annotations[DISK_RESOURCE] || '';
const nodeSelectors = diskConfig.toUpperCase() === 'HIGH' ? { disk: 'high' } : {};

hoek.merge(nodeSelectors, this.nodeSelectors);
Copy link
Member

@tkyi tkyi Sep 10, 2018

Choose a reason for hiding this comment

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

this.nodeSelectors will override nodeSelectors if there's any conflicts (https://github.com/hapijs/hoek/blob/master/API.md#mergetarget-source-isnulloverride-ismergearrays). Is this a concern at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe it should be fine since we currently do not specify a default selector in regards to any resource.

Copy link
Member

@tkyi tkyi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@minzcmu minzcmu merged commit 54a3b82 into master Sep 11, 2018
@minzcmu minzcmu deleted the disk branch September 11, 2018 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants