Skip to content

Commit b2d6d5d

Browse files
CR-1288 Storing tolerations in RE (#642)
* Storing tolerations in RE * Fixes
1 parent f38ef8d commit b2d6d5d

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

lib/interface/cli/commands/hybrid/helper.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,9 @@ function mergeValuesFromValuesFile(argv, valuesFile, handleError) {
10461046
if (_.has(valuesObj, 'Runtime.resources')) {
10471047
_.set(_argv, 'reResources', valuesObj.Runtime.resources);
10481048
}
1049+
if (_.has(valuesObj, 'Runtime.tolerations')) {
1050+
_.set(_argv, 'reTolerations', valuesObj.Runtime.tolerations);
1051+
}
10491052
if (_.has(valuesObj, 'Runtime.userVolumeMounts')) {
10501053
_.set(_argv, 'userVolumeMounts', valuesObj.Runtime.userVolumeMounts);
10511054
}

lib/interface/cli/commands/hybrid/init.cmd.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const initCmd = new Command({
143143
describe: 'Name of the namespace on which runner should be installed [$CF_ARG_KUBE_NAMESPACE]',
144144
})
145145
.option('tolerations', {
146-
describe: 'The Kubernetes tolerations as path to a JSON file prefixed with @ to be used by runner resources (default is no tolerations) (string)',
146+
describe: 'The Kubernetes tolerations as path to a JSON file prefixed with @ to be used by runner resources (default is no tolerations) (string)',
147147
})
148148
.option('storage-class-name', {
149149
describe: 'Set a name of your custom storage class',
@@ -263,6 +263,7 @@ const initCmd = new Command({
263263
runtimeName,
264264
reEnvVars,
265265
reResources,
266+
reTolerations,
266267
userVolumeMounts,
267268
userVolumes,
268269
'dry-run': dryRun,
@@ -609,6 +610,11 @@ const initCmd = new Command({
609610
_.set(re, 'dockerDaemonScheduler.defaultDindResources', reResources);
610611
}
611612

613+
if (reTolerations) {
614+
_.set(re, 'runtimeScheduler.tolerations', reTolerations);
615+
_.set(re, 'dockerDaemonScheduler.tolerations', reTolerations);
616+
}
617+
612618
if (userVolumeMounts) {
613619
const currentdockerDaemonScheduler = _.get(re, 'dockerDaemonScheduler', {});
614620
const newDockerDaemonScheduler = _.merge(currentdockerDaemonScheduler, { userVolumeMounts });

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.75.8",
3+
"version": "0.75.9",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)