@@ -121,6 +121,10 @@ const initCmd = new Command({
121
121
describe : 'Do not test given kubeconfig context to have all the required permission' ,
122
122
type : 'boolean' ,
123
123
} )
124
+ . option ( 'skip-cluster-integration' , {
125
+ describe : 'Do not create a cluster integration in Codefresh' ,
126
+ type : 'boolean' ,
127
+ } )
124
128
. option ( 'set-default-runtime' , {
125
129
describe : 'Set this as the default runtime environment for your Codefresh account' ,
126
130
type : 'boolean' ,
@@ -246,6 +250,7 @@ const initCmd = new Command({
246
250
'env-vars' : envVars ,
247
251
yes : noQuestions ,
248
252
'skip-cluster-test' : skipClusterTest ,
253
+ 'skip-cluster-integration' : skipClusterIntegration ,
249
254
'docker-registry' : dockerRegistry ,
250
255
token,
251
256
name,
@@ -648,6 +653,9 @@ const initCmd = new Command({
648
653
} ,
649
654
installationEvent : installationProgress . events . CLUSTER_INTEGRATION_ADDED ,
650
655
condition : async ( ) => {
656
+ if ( skipClusterIntegration ) {
657
+ return false ;
658
+ }
651
659
if ( isInCluster ( ) ) {
652
660
console . log ( 'Cluster integration was not added , please add it via codefresh "create clusters [name]"' ) ;
653
661
return false ;
@@ -661,7 +669,6 @@ const initCmd = new Command({
661
669
} ) ;
662
670
663
671
// install runtime on cluster
664
- setValue . push ( '--RuntimeInCluster=true' ) ;
665
672
installationPlan . addStep ( {
666
673
name : 'install runtime' ,
667
674
func : async ( ) => {
@@ -770,6 +777,9 @@ const initCmd = new Command({
770
777
verbose, // --verbose
771
778
runtimeName : installationPlan . getContext ( 'runtimeName' ) , // --runtimeName
772
779
dryRun,
780
+ valuesFile,
781
+ setValue,
782
+ setFile,
773
783
} ) ;
774
784
} ,
775
785
installationEvent : installationProgress . events . RUNNER_INSTALLED ,
@@ -804,7 +814,7 @@ const initCmd = new Command({
804
814
return false ;
805
815
}
806
816
807
- if ( isInCluster ( ) ) {
817
+ if ( isInCluster ( ) || skipClusterIntegration ) {
808
818
console . log ( 'Monitor component cannot be installed without cluster integration, you can install it seperately using: "codefresh install monitor"' ) ;
809
819
return false ;
810
820
}
0 commit comments