@@ -259,7 +259,7 @@ func installOLM() {
259
259
return
260
260
}
261
261
262
- olmInstall := promptLine ("2) Install OLM" , "[y,n]" , "n" )
262
+ olmInstall := promptLine ("2) Install OLM (optional) " , "[y,n]" , "n" )
263
263
if olmInstall != "y" {
264
264
installOlm = false
265
265
return
@@ -493,6 +493,8 @@ func installKuberoUi() {
493
493
494
494
createNamespace ("kubero" )
495
495
496
+ gitops := promptLine ("Enable GitOps Feature" , "[y,n]" , "n" )
497
+
496
498
kuberoSecretInstalled , _ := exec .Command ("kubectl" , "get" , "secret" , "kubero-secrets" , "-n" , "kubero" ).Output ()
497
499
if len (kuberoSecretInstalled ) > 0 {
498
500
_ , _ = cfmt .Println ("{{✓ Kubero Secret exists}}::lightGreen" )
@@ -528,53 +530,56 @@ func installKuberoUi() {
528
530
//"--from-literal=KUBERO_USERS="+userDBencoded, // DEPRECATED in v3.0.0
529
531
)
530
532
531
- githubConfigure := promptLine ("Configure Github" , "[y,n]" , "n" )
532
- githubPersonalAccessToken := ""
533
- if githubConfigure == "y" {
534
- githubPersonalAccessToken = promptLine ("Github personal access token" , "" , "" )
535
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITHUB_PERSONAL_ACCESS_TOKEN=" + githubPersonalAccessToken )
536
- }
533
+ if gitops == "y" {
534
+
535
+ githubConfigure := promptLine ("Configure Github" , "[y,n]" , "n" )
536
+ githubPersonalAccessToken := ""
537
+ if githubConfigure == "y" {
538
+ githubPersonalAccessToken = promptLine ("Github personal access token" , "" , "" )
539
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITHUB_PERSONAL_ACCESS_TOKEN=" + githubPersonalAccessToken )
540
+ }
537
541
538
- giteaConfigure := promptLine ("Configure Gitea" , "[y,n]" , "n" )
539
- giteaPersonalAccessToken := ""
540
- giteaBaseUrl := ""
541
- if giteaConfigure == "y" {
542
- giteaPersonalAccessToken = promptLine ("Gitea personal access token" , "" , "" )
543
- giteaBaseUrl = promptLine ("Gitea URL" , "http://localhost:3000" , "" )
544
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITEA_PERSONAL_ACCESS_TOKEN=" + giteaPersonalAccessToken )
545
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITEA_BASEURL=" + giteaBaseUrl )
546
- }
542
+ giteaConfigure := promptLine ("Configure Gitea" , "[y,n]" , "n" )
543
+ giteaPersonalAccessToken := ""
544
+ giteaBaseUrl := ""
545
+ if giteaConfigure == "y" {
546
+ giteaPersonalAccessToken = promptLine ("Gitea personal access token" , "" , "" )
547
+ giteaBaseUrl = promptLine ("Gitea URL" , "http://localhost:3000" , "" )
548
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITEA_PERSONAL_ACCESS_TOKEN=" + giteaPersonalAccessToken )
549
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITEA_BASEURL=" + giteaBaseUrl )
550
+ }
547
551
548
- gogsConfigure := promptLine ("Configure Gogs" , "[y,n]" , "n" )
549
- gogsPersonalAccessToken := ""
550
- gogsBaseUrl := ""
551
- if gogsConfigure == "y" {
552
- gogsPersonalAccessToken = promptLine ("Gogs personal access token" , "" , "" )
553
- gogsBaseUrl = promptLine ("Gogs URL" , "http://localhost:3000" , "" )
554
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GOGS_PERSONAL_ACCESS_TOKEN=" + gogsPersonalAccessToken )
555
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GOGS_BASEURL=" + gogsBaseUrl )
556
- }
552
+ gogsConfigure := promptLine ("Configure Gogs" , "[y,n]" , "n" )
553
+ gogsPersonalAccessToken := ""
554
+ gogsBaseUrl := ""
555
+ if gogsConfigure == "y" {
556
+ gogsPersonalAccessToken = promptLine ("Gogs personal access token" , "" , "" )
557
+ gogsBaseUrl = promptLine ("Gogs URL" , "http://localhost:3000" , "" )
558
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GOGS_PERSONAL_ACCESS_TOKEN=" + gogsPersonalAccessToken )
559
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GOGS_BASEURL=" + gogsBaseUrl )
560
+ }
557
561
558
- gitlabConfigure := promptLine ("Configure Gitlab" , "[y,n]" , "n" )
559
- gitlabPersonalAccessToken := ""
560
- gitlabBaseUrl := ""
561
- if gitlabConfigure == "y" {
562
- gitlabPersonalAccessToken = promptLine ("Gitlab personal access token" , "" , "" )
563
- gitlabBaseUrl = promptLine ("Gitlab URL" , "http://localhost:3080" , "" )
564
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITLAB_PERSONAL_ACCESS_TOKEN=" + gitlabPersonalAccessToken )
565
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITLAB_BASEURL=" + gitlabBaseUrl )
566
- }
562
+ gitlabConfigure := promptLine ("Configure Gitlab" , "[y,n]" , "n" )
563
+ gitlabPersonalAccessToken := ""
564
+ gitlabBaseUrl := ""
565
+ if gitlabConfigure == "y" {
566
+ gitlabPersonalAccessToken = promptLine ("Gitlab personal access token" , "" , "" )
567
+ gitlabBaseUrl = promptLine ("Gitlab URL" , "http://localhost:3080" , "" )
568
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITLAB_PERSONAL_ACCESS_TOKEN=" + gitlabPersonalAccessToken )
569
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=GITLAB_BASEURL=" + gitlabBaseUrl )
570
+ }
567
571
568
- bitbucketConfigure := promptLine ("Configure Bitbucket" , "[y,n]" , "n" )
569
- bitbucketUsername := ""
570
- bitbucketAppPassword := ""
571
- if bitbucketConfigure == "y" {
572
- bitbucketUsername = promptLine ("Bitbucket Username" , "" , "" )
573
- bitbucketAppPassword = promptLine ("Bitbucket App Password" , "" , "" )
574
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=BITBUCKET_USERNAME=" + bitbucketUsername )
575
- createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=BITBUCKET_APP_PASSWORD=" + bitbucketAppPassword )
576
- }
572
+ bitbucketConfigure := promptLine ("Configure Bitbucket" , "[y,n]" , "n" )
573
+ bitbucketUsername := ""
574
+ bitbucketAppPassword := ""
575
+ if bitbucketConfigure == "y" {
576
+ bitbucketUsername = promptLine ("Bitbucket Username" , "" , "" )
577
+ bitbucketAppPassword = promptLine ("Bitbucket App Password" , "" , "" )
578
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=BITBUCKET_USERNAME=" + bitbucketUsername )
579
+ createSecretCommand .Args = append (createSecretCommand .Args , "--from-literal=BITBUCKET_APP_PASSWORD=" + bitbucketAppPassword )
580
+ }
577
581
582
+ }
578
583
createSecretCommand .Args = append (createSecretCommand .Args , "-n" , "kubero" )
579
584
580
585
_ , kuberoErr := createSecretCommand .Output ()
@@ -630,39 +635,42 @@ func installKuberoUi() {
630
635
}
631
636
}
632
637
633
- kuberoUIRegistry := promptLine ("Enable BuildPipeline for Kubero" , "[y/n]" , "n" )
634
- if kuberoUIRegistry == "y" {
635
- kuberoUIConfig .Spec .Registry .Enabled = true
638
+ if gitops == "y" {
636
639
637
- kuberoUICreateRegistry := promptLine ("Create a local Registry for Kubero" , "[y/n]" , "n" )
638
- if kuberoUICreateRegistry == "y" {
639
- kuberoUIConfig .Spec .Registry .Create = true
640
+ kuberoUIRegistry := promptLine ("Enable Buildpipeline for Kubero (BETA) " , "[y/n]" , "n" )
641
+ if kuberoUIRegistry == "y" {
642
+ kuberoUIConfig .Spec .Registry .Enabled = true
640
643
641
- kuberoUIRegistryStorage := promptLine ("Registry storage size" , "" , "10Gi" )
642
- kuberoUIConfig .Spec .Registry .Storage = kuberoUIRegistryStorage
644
+ kuberoUICreateRegistry := promptLine ("Create a local Registry for Kubero" , "[y/n]" , "n" )
645
+ if kuberoUICreateRegistry == "y" {
646
+ kuberoUIConfig .Spec .Registry .Create = true
643
647
644
- storageClassList := getAvailableStorageClasses ()
648
+ kuberoUIRegistryStorage := promptLine ("Registry storage size" , "" , "10Gi" )
649
+ kuberoUIConfig .Spec .Registry .Storage = kuberoUIRegistryStorage
645
650
646
- kuberoUIRegistryStorageClassName := selectFromList ("Registry storage class" , storageClassList , "" )
647
- kuberoUIConfig .Spec .Registry .StorageClassName = kuberoUIRegistryStorageClassName
648
- }
651
+ storageClassList := getAvailableStorageClasses ()
652
+
653
+ kuberoUIRegistryStorageClassName := selectFromList ("Registry storage class" , storageClassList , "" )
654
+ kuberoUIConfig .Spec .Registry .StorageClassName = kuberoUIRegistryStorageClassName
655
+ }
649
656
650
- kuberoUIRegistryHost := promptLine ("Registry" , "[registry.kubero.mydomain.com]" , "" )
651
- kuberoUIConfig .Spec .Registry .Host = kuberoUIRegistryHost
657
+ kuberoUIRegistryHost := promptLine ("Registry" , "[registry.kubero.mydomain.com]" , "" )
658
+ kuberoUIConfig .Spec .Registry .Host = kuberoUIRegistryHost
652
659
653
- kuberoUIRegistrySubPath := promptLine ("SubPath (optional) " , "[example/foo/bar]" , "" )
654
- kuberoUIConfig .Spec .Registry .SubPath = kuberoUIRegistrySubPath
660
+ kuberoUIRegistrySubpath := promptLine ("Subpath (optional) " , "[example/foo/bar]" , "" )
661
+ kuberoUIConfig .Spec .Registry .Subpath = kuberoUIRegistrySubpath
655
662
656
- kuberoUIConfig .Spec .Registry .Port = 443
663
+ kuberoUIConfig .Spec .Registry .Port = 443
657
664
658
- kuberoUIRegistryUsername := promptLine ("Registry username" , "" , "admin" )
659
- kuberoUIConfig .Spec .Registry .Account .Username = kuberoUIRegistryUsername
665
+ kuberoUIRegistryUsername := promptLine ("Registry username" , "" , "admin" )
666
+ kuberoUIConfig .Spec .Registry .Account .Username = kuberoUIRegistryUsername
660
667
661
- kuberoUIRegistryPassword := promptLine ("Registry password" , "" , generateRandomString (12 , "" ))
662
- kuberoUIConfig .Spec .Registry .Account .Password = kuberoUIRegistryPassword
668
+ kuberoUIRegistryPassword := promptLine ("Registry password" , "" , generateRandomString (12 , "" ))
669
+ kuberoUIConfig .Spec .Registry .Account .Password = kuberoUIRegistryPassword
663
670
664
- kuberoUIRegistryPasswordBytes , _ := bcrypt .GenerateFromPassword ([]byte (kuberoUIRegistryPassword ), 14 )
665
- kuberoUIConfig .Spec .Registry .Account .Hash = string (kuberoUIRegistryPasswordBytes )
671
+ kuberoUIRegistryPasswordBytes , _ := bcrypt .GenerateFromPassword ([]byte (kuberoUIRegistryPassword ), 14 )
672
+ kuberoUIConfig .Spec .Registry .Account .Hash = string (kuberoUIRegistryPasswordBytes )
673
+ }
666
674
}
667
675
668
676
/* DEPRECATED in v3.0.0
@@ -882,7 +890,7 @@ func installMonitoring() {
882
890
883
891
func installCertManager () {
884
892
885
- install := promptLine ("6) Install SSL CertManager " , "[y,n]" , "y" )
893
+ install := promptLine ("6) Install SSL Cert Manager " , "[y,n]" , "y" )
886
894
if install != "y" {
887
895
return
888
896
}
0 commit comments