Skip to content

Commit 0062178

Browse files
Monitoring token (#669)
1 parent 1c92eb2 commit 0062178

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ const initCmd = new Command({
844844
return true;
845845
}
846846

847+
const monitoringToken = _.get(sdk, 'config.context.token');
848+
847849
// install monitoring
848850
installationPlan.addStep({
849851
name: 'install cluster monitoring',
@@ -859,7 +861,7 @@ const initCmd = new Command({
859861
'set-file': setFile,
860862
'dry-run': dryRun,
861863
'bypass-download': bypassDownload,
862-
token: _.get(sdk, 'config.context.token'),
864+
token: monitoringToken,
863865
verbose,
864866
noExit: true, // to prevent if from calling inner: process.exit()
865867
url,
@@ -891,6 +893,7 @@ const initCmd = new Command({
891893
const monitor = {
892894
enabled: shouldInstallMonitoringFn(),
893895
clusterId: kubeContextName,
896+
token: monitoringToken,
894897
};
895898

896899
const global = {
@@ -941,7 +944,7 @@ const initCmd = new Command({
941944
await drawCodefreshFiglet();
942945

943946
if (shouldUseHelm) {
944-
console.log('\n\nTo install helm run:');
947+
console.log('\nTo install helm run:\n');
945948
console.log('helm repo add cf-runtime https://h.cfcr.io/codefresh-inc/runtime');
946949
console.log(`kubectl create ns ${kubeNamespace}`);
947950
console.log(`helm install cf-runtime cf-runtime/cf-runtime -f ${helmValuesFile} --namespace ${kubeNamespace}\n`);

0 commit comments

Comments
 (0)