@@ -121,6 +121,10 @@ const initCmd = new Command({
121121 describe : 'Do not test given kubeconfig context to have all the required permission' ,
122122 type : 'boolean' ,
123123 } )
124+ . option ( 'skip-cluster-integration' , {
125+ describe : 'Do not create a cluster integration in Codefresh' ,
126+ type : 'boolean' ,
127+ } )
124128 . option ( 'set-default-runtime' , {
125129 describe : 'Set this as the default runtime environment for your Codefresh account' ,
126130 type : 'boolean' ,
@@ -246,6 +250,7 @@ const initCmd = new Command({
246250 'env-vars' : envVars ,
247251 yes : noQuestions ,
248252 'skip-cluster-test' : skipClusterTest ,
253+ 'skip-cluster-integration' : skipClusterIntegration ,
249254 'docker-registry' : dockerRegistry ,
250255 token,
251256 name,
@@ -648,6 +653,9 @@ const initCmd = new Command({
648653 } ,
649654 installationEvent : installationProgress . events . CLUSTER_INTEGRATION_ADDED ,
650655 condition : async ( ) => {
656+ if ( skipClusterIntegration ) {
657+ return false ;
658+ }
651659 if ( isInCluster ( ) ) {
652660 console . log ( 'Cluster integration was not added , please add it via codefresh "create clusters [name]"' ) ;
653661 return false ;
@@ -661,7 +669,6 @@ const initCmd = new Command({
661669 } ) ;
662670
663671 // install runtime on cluster
664- setValue . push ( '--RuntimeInCluster=true' ) ;
665672 installationPlan . addStep ( {
666673 name : 'install runtime' ,
667674 func : async ( ) => {
@@ -770,6 +777,9 @@ const initCmd = new Command({
770777 verbose, // --verbose
771778 runtimeName : installationPlan . getContext ( 'runtimeName' ) , // --runtimeName
772779 dryRun,
780+ valuesFile,
781+ setValue,
782+ setFile,
773783 } ) ;
774784 } ,
775785 installationEvent : installationProgress . events . RUNNER_INSTALLED ,
@@ -804,7 +814,7 @@ const initCmd = new Command({
804814 return false ;
805815 }
806816
807- if ( isInCluster ( ) ) {
817+ if ( isInCluster ( ) || skipClusterIntegration ) {
808818 console . log ( 'Monitor component cannot be installed without cluster integration, you can install it seperately using: "codefresh install monitor"' ) ;
809819 return false ;
810820 }
0 commit comments