File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -636,7 +636,7 @@ const initCmd = new Command({
636
636
installationEvent : installationProgress . events . CLUSTER_INTEGRATION_ADDED ,
637
637
condition : async ( ) => {
638
638
if ( isInCluster ( ) ) {
639
- console . log ( 'Cluster integration was not added , please add it via codefresh create clusters [name] ' ) ;
639
+ console . log ( 'Cluster integration was not added , please add it via codefresh " create clusters [name]" ' ) ;
640
640
return false ;
641
641
}
642
642
const clusters = await sdk . clusters . list ( ) || [ ] ;
@@ -778,7 +778,18 @@ const initCmd = new Command({
778
778
} ,
779
779
successMessage : 'Successfully installed cluster monitoring' ,
780
780
installationEvent : installationProgress . events . MONITOR_INSTALLED ,
781
- condition : installMonitor ,
781
+ condition : async ( ) => {
782
+ if ( ! installMonitor ) {
783
+ return false ;
784
+ }
785
+
786
+ if ( isInCluster ( ) ) {
787
+ console . log ( 'Monitor component cannot be installed without cluster integration, you can install it seperately using: "codefresh install monitor"' ) ;
788
+ return false ;
789
+ }
790
+
791
+ return true ;
792
+ } ,
782
793
} ) ;
783
794
784
795
// Post Installation
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const installRoot = require('../root/install.cmd');
4
4
const { DefaultLogFormatter } = require ( './../hybrid/helper' ) ;
5
5
const { downloadVeonona } = require ( '../hybrid/helper' ) ;
6
6
const { Runner, components } = require ( '../../../../binary' ) ;
7
+ const sdk = require ( '../../../../logic/sdk' ) ;
7
8
const _ = require ( 'lodash' ) ;
8
9
9
10
const installMonitorCmd = new Command ( {
@@ -77,9 +78,11 @@ const installMonitorCmd = new Command({
77
78
commands . push ( clusterId ) ;
78
79
}
79
80
81
+ commands . push ( '--codefreshToken' ) ;
80
82
if ( token ) {
81
- commands . push ( '--codefreshToken' ) ;
82
83
commands . push ( token ) ;
84
+ } else {
85
+ commands . push ( _ . get ( sdk , 'config.context.token' ) ) ;
83
86
}
84
87
85
88
if ( kubeConfigPath ) {
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ const _getKubeConfig = (kubeconfigPath) => {
17
17
return kc ;
18
18
} ;
19
19
20
- const isInCluster = ( ) => {
21
- return fs . existsSync ( '/var/run/secrets/kubernetes.io/serviceaccount' ) ;
22
- } ;
20
+ const isInCluster = ( ) => fs . existsSync ( '/var/run/secrets/kubernetes.io/serviceaccount' ) ;
23
21
24
22
const getKubeContext = ( kubeconfigPath ) => {
25
23
const kubeconfig = _getKubeConfig ( kubeconfigPath ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.74.5 " ,
3
+ "version" : " 0.74.6 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments