-
Notifications
You must be signed in to change notification settings - Fork 8
feat(757): Change toleration key from disk to screwdriver.cd/disk #42
Conversation
index.js
Outdated
@@ -252,7 +252,8 @@ class K8sVMExecutor extends Executor { | |||
const podConfig = yaml.safeLoad(podTemplate); | |||
|
|||
const diskConfig = annotations[DISK_RESOURCE] || ''; | |||
const nodeSelectors = diskConfig.toUpperCase() === 'HIGH' ? { disk: 'high' } : {}; | |||
const nodeSelectors = diskConfig.toUpperCase() === 'HIGH' ? | |||
{ 'screwdriver.cd/disk': 'high' } : {}; |
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.
Shall we make this label configurable? Otherwise later on if we decide to change the label, we need to actually change this line.
https://github.com/screwdriver-cd/queue-worker/blob/master/config/default.yaml#L31
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.
I see, so something like options -> kubernetes -> labels -> disk
, then bind it it to the executor as part of the constructer?
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.
Added an extra commit to configure the disk label. Should not be blocked on the queue-worker implementation since we default to screwdriver.cd/disk
if the option is missing.
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.
This label lgtm. But not sure this will be part the high resource profile or it is a separate dimension of configurations.
index.js
Outdated
@@ -157,6 +157,8 @@ class K8sVMExecutor extends Executor { | |||
this.highMemory = hoek.reach(options, 'kubernetes.resources.memory.high', { default: 12 }); | |||
this.lowMemory = hoek.reach(options, 'kubernetes.resources.memory.low', { default: 2 }); | |||
this.microMemory = hoek.reach(options, 'kubernetes.resources.memory.micro', { default: 1 }); | |||
this.diskLabel = hoek.reach(options, 'kubernetes.labels.disk', | |||
{ default: 'screwdriver.cd/disk' }); |
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.
same concern about setting the default label as my comment in screwdriver-cd/queue-worker#97 (review).
Context
We should use a less generic label than
disk=high
.Objective
Change the toleration/pod affinity key from
disk
toscrewdriver.cd/disk
.References
screwdriver-cd/screwdriver#757