Skip to content

Commit bcc5e8d

Browse files
support storage class (#462)
* support storage class
1 parent de16efa commit bcc5e8d

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

lib/interface/cli/commands/agent/install.cmd.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ const installAgentCmd = new Command({
8484
.option('make-default-runtime', {
8585
describe: 'should all pipelines run on the hybrid runtime (default is false)',
8686
})
87+
.option('storage-class-name', {
88+
describe: 'Set a name of your custom storage class, note: this will not install volume provisioning components',
89+
})
8790
.option('skip-cluster-test', {
8891
describe: 'Do not run cluster acceptance test',
8992
})
@@ -106,6 +109,7 @@ const installAgentCmd = new Command({
106109
'install-runtime': installRuntime,
107110
'make-default-runtime': shouldMakeDefaultRe,
108111
'skip-cluster-test': skipClusterTest,
112+
'storage-class-name': storageClassName,
109113
verbose,
110114
terminateProcess,
111115
} = argv;
@@ -193,6 +197,7 @@ const installAgentCmd = new Command({
193197
'restart-agent': true,
194198
'make-default-runtime': shouldMakeDefaultRe,
195199
'skip-cluster-test': skipClusterTest,
200+
'storage-class-name': storageClassName,
196201
verbose,
197202
terminateProcess,
198203
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const deleteCmd = new Command({
8383
questions.push({
8484
type: 'list',
8585
name: 'name',
86-
message: 'Runner manager name to uninstall',
86+
message: 'Agent name to uninstall',
8787
choices: agents,
8888
});
8989
}
@@ -95,7 +95,7 @@ const deleteCmd = new Command({
9595
// check that agent exists
9696
const agent = _.find(agents, curr => curr.name === agentName);
9797
if (!agent) {
98-
console.log(colors.red(`Runner Manager with name ${agentName} doesn\'t exists`));
98+
console.log(colors.red(`Agent with name ${agentName} doesn\'t exists`));
9999
return;
100100
}
101101
if (agent.runtimes && agent.runtimes > 1) {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async function createAndExecuteDemoPipeline(runtimeName, progressReporter) {
103103
const [pipelineExecutionError] = await to(pipelinesRunCmd.handler({
104104
name: INSTALLATION_DEFAULTS.DEMO_PIPELINE_NAME,
105105
exitProcess: false,
106+
annotation: [],
106107
}));
107108
await handleError(pipelineExecutionError, 'Failed to run demo pipeline', progressReporter, installationProgress.events.PIPELINE_EXECUTED);
108109

@@ -195,6 +196,9 @@ const initCmd = new Command({
195196
.option('tolerations', {
196197
describe: 'The kubernetes tolerations as path to a JSON file to be used by venona resources (default is no tolerations) (string)',
197198
})
199+
.option('storage-class-name', {
200+
describe: 'Set a name of your custom storage class',
201+
})
198202
.option('venona-version', {
199203
describe: 'Version of venona to install (default is the latest)',
200204
})
@@ -217,6 +221,7 @@ const initCmd = new Command({
217221
'venona-version': venonaVersion,
218222
'kube-config-path': kubeConfigPath,
219223
'skip-version-check': skipVersionCheck,
224+
'storage-class-name': storageClassName,
220225
yes: noQuestions,
221226
verbose,
222227
name, url,
@@ -347,6 +352,7 @@ const initCmd = new Command({
347352
'install-runtime': true,
348353
verbose,
349354
'make-default-runtime': shouldMakeDefaultRe,
355+
'storage-class-name': storageClassName,
350356
terminateProcess: false,
351357
};
352358
const [err, runtimeName] = await to(installAgent.handler(agentInstallOptions));
@@ -373,6 +379,7 @@ const initCmd = new Command({
373379

374380
console.log(colors.green('\nRunner Status:'));
375381
await getAgents.handler({});
382+
console.log(colors.green(`\nGo to ${colors.blue('https://g.codefresh.io/kubernetes/monitor/services')} to view your cluster in codefresh dashbaord`));
376383
console.log(colors.green(`\nDocumenation link: ${colors.blue('https://codefresh.io/docs/docs/enterprise/codefresh-runner/#codefresh-runner-preview-release')}`));
377384
console.log(colors.green(`If you had any issues with the installation please report them at: ${colors.blue('https://github.com/codefresh-io/cli/issues/new')}`));
378385
await to(progressReporter.report(installationProgress.events.FINISHED, installationProgress.status.SUCCESS));

lib/interface/cli/commands/runtimeEnvironments/install.cmd.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ const installRuntimeCmd = new Command({
231231
terminateProcess: !attachRuntime,
232232
events: runtimeEvents,
233233
skipClusterTest,
234+
storageClassName,
234235
});
235236
// attach RE to agent in codefresh
236237

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.63.0",
3+
"version": "0.63.2",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,
@@ -37,7 +37,7 @@
3737
"cf-errors": "^0.1.12",
3838
"chalk": "^1.1.3",
3939
"cli-progress": "3.6.0",
40-
"codefresh-sdk": "1.8.4",
40+
"codefresh-sdk": "1.8.5",
4141
"colors": "^1.1.2",
4242
"columnify": "^1.5.4",
4343
"compare-versions": "^3.4.0",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,10 +1242,10 @@ code-point-at@^1.0.0:
12421242
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
12431243
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
12441244

1245-
codefresh-sdk@1.8.4:
1246-
version "1.8.4"
1247-
resolved "https://registry.yarnpkg.com/codefresh-sdk/-/codefresh-sdk-1.8.4.tgz#aac884bc9212b0af4036a933c4304318606616f5"
1248-
integrity sha512-+qFBae8M9pb6qRZrHzecw7spVZOLWpbQ/pxyBriGuE7PWBzB4nh4x6eb/R/sP41GA1q5WjwNc1KH4yWwGbV4HA==
1245+
codefresh-sdk@1.8.5:
1246+
version "1.8.5"
1247+
resolved "https://registry.yarnpkg.com/codefresh-sdk/-/codefresh-sdk-1.8.5.tgz#8c77d5244fe95a49880a83822892fbdbbb21f850"
1248+
integrity sha512-TwS2H1+o/n7RY7OQ+kZSpjz/EPTnKmbGcr9wSdkGgoErfU1fNq4y1ALW6Icvh6v7vULZHfJqd8V+dUGFhph6CQ==
12491249
dependencies:
12501250
bluebird "^3.5.3"
12511251
cf-errors "^0.1.12"

0 commit comments

Comments
 (0)