Skip to content

Commit 512ccd5

Browse files
fixed re env vars not set and storage class name not set using values… (#610)
* fixed re env vars not set and storage class name not set using values file
1 parent cdbf0fd commit 512ccd5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,9 @@ function mergeValuesFromValuesFile(argv, valuesFile, handleError) {
10401040
if (_.has(valuesObj, 'Runtime.userVolumes')) {
10411041
_.set(_argv, 'userVolumes', valuesObj.Runtime.userVolumes);
10421042
}
1043+
if (!_.has(_argv, 'storage-class-name') && _.has(valuesObj, 'StorageClass')) {
1044+
_.set(_argv, 'storage-class-name', valuesObj.StorageClass);
1045+
}
10431046

10441047
return _argv;
10451048
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ const initCmd = new Command({
572572
const re = await sdk.runtimeEnvs.get({ name: reName });
573573

574574
// update re env vars
575-
if (envVars.length) {
575+
if (envVars.length || reEnvVars) {
576576
const envVarsObj = _.merge(keyValueArrayToObject(envVars), reEnvVars);
577577

578578
const currentEngineEnvVars = _.get(re, 'runtimeScheduler.envVars', {});
@@ -604,7 +604,7 @@ const initCmd = new Command({
604604
await sdk.runtimeEnvs.update({ name: reName }, re);
605605
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with env vars`);
606606
},
607-
condition: envVars.length || reResources || userVolumeMounts || userVolumes,
607+
condition: envVars.length || reResources || userVolumeMounts || userVolumes || reEnvVars,
608608
});
609609

610610
// set runtime as default

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.73.33",
3+
"version": "0.73.34",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)