@@ -124,6 +124,7 @@ type (
124
124
reporterName string
125
125
gvr []gvr
126
126
saName string
127
+ IsInternal bool
127
128
}
128
129
129
130
summaryLogLevels string
@@ -590,7 +591,11 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
590
591
KubeContextName : opts .kubeContext ,
591
592
Timeout : store .Get ().WaitTimeout ,
592
593
ArgoCDLabels : map [string ]string {
593
- store .Get ().LabelKeyCFType : store .Get ().CFComponentType ,
594
+ store .Get ().LabelKeyCFType : store .Get ().CFComponentType ,
595
+ store .Get ().LabelKeyCFInternal : "true" ,
596
+ },
597
+ BootstrapAppsLabels : map [string ]string {
598
+ store .Get ().LabelKeyCFInternal : "true" ,
594
599
},
595
600
})
596
601
handleCliStep (reporter .InstallStepBootstrapRepo , "Bootstrapping repository" , err , true )
@@ -602,7 +607,8 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
602
607
CloneOpts : opts .InsCloneOpts ,
603
608
ProjectName : opts .RuntimeName ,
604
609
Labels : map [string ]string {
605
- store .Get ().LabelKeyCFType : fmt .Sprintf ("{{ labels.%s }}" , util .EscapeAppsetFieldName (store .Get ().LabelKeyCFType )),
610
+ store .Get ().LabelKeyCFType : fmt .Sprintf ("{{ labels.%s }}" , util .EscapeAppsetFieldName (store .Get ().LabelKeyCFType )),
611
+ store .Get ().LabelKeyCFInternal : fmt .Sprintf ("{{ labels.%s }}" , util .EscapeAppsetFieldName (store .Get ().LabelKeyCFInternal )),
606
612
},
607
613
})
608
614
handleCliStep (reporter .InstallStepCreateProject , "Creating Project" , err , true )
@@ -691,6 +697,7 @@ func createRuntimeComponents(ctx context.Context, opts *RuntimeInstallOptions, r
691
697
for _ , component := range rt .Spec .Components {
692
698
infoStr := fmt .Sprintf ("Creating component \" %s\" " , component .Name )
693
699
log .G (ctx ).Infof (infoStr )
700
+ component .IsInternal = true
694
701
err = component .CreateApp (ctx , opts .KubeFactory , opts .InsCloneOpts , opts .RuntimeName , store .Get ().CFComponentType , "" , "" )
695
702
if err != nil {
696
703
err = util .DecorateErrorWithDocsLink (fmt .Errorf ("failed to create \" %s\" application: %w" , component .Name , err ))
@@ -820,6 +827,7 @@ you can try to create it manually by running:
820
827
821
828
func installComponents (ctx context.Context , opts * RuntimeInstallOptions , rt * runtime.Runtime ) error {
822
829
var err error
830
+
823
831
if opts .IngressHost != "" && ! store .Get ().SkipIngress {
824
832
if err = createWorkflowsIngress (ctx , opts , rt ); err != nil {
825
833
return fmt .Errorf ("failed to patch Argo-Workflows ingress: %w" , err )
@@ -844,7 +852,8 @@ func installComponents(ctx context.Context, opts *RuntimeInstallOptions, rt *run
844
852
version : "v1alpha1" ,
845
853
},
846
854
},
847
- saName : store .Get ().CodefreshSA ,
855
+ saName : store .Get ().CodefreshSA ,
856
+ IsInternal : true ,
848
857
}); err != nil {
849
858
return fmt .Errorf ("failed to create workflows-reporter: %w" , err )
850
859
}
@@ -868,7 +877,8 @@ func installComponents(ctx context.Context, opts *RuntimeInstallOptions, rt *run
868
877
version : "v1alpha1" ,
869
878
},
870
879
},
871
- saName : store .Get ().RolloutReporterServiceAccount ,
880
+ saName : store .Get ().RolloutReporterServiceAccount ,
881
+ IsInternal : true ,
872
882
}); err != nil {
873
883
return fmt .Errorf ("failed to create rollout-reporter: %w" , err )
874
884
}
@@ -1476,6 +1486,7 @@ func RunRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
1476
1486
1477
1487
for _ , component := range newComponents {
1478
1488
log .G (ctx ).Infof ("Installing new component \" %s\" " , component .Name )
1489
+ component .IsInternal = true
1479
1490
err = component .CreateApp (ctx , nil , opts .CloneOpts , opts .RuntimeName , store .Get ().CFComponentType , "" , "" )
1480
1491
if err != nil {
1481
1492
err = fmt .Errorf ("failed to create \" %s\" application: %w" , component .Name , err )
@@ -1651,9 +1662,10 @@ func createEventsReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts
1651
1662
1652
1663
resPath := cloneOpts .FS .Join (apstore .Default .AppsDir , store .Get ().EventsReporterName , opts .RuntimeName , "resources" )
1653
1664
appDef := & runtime.AppDef {
1654
- Name : store .Get ().EventsReporterName ,
1655
- Type : application .AppTypeDirectory ,
1656
- URL : cloneOpts .URL () + "/" + resPath ,
1665
+ Name : store .Get ().EventsReporterName ,
1666
+ Type : application .AppTypeDirectory ,
1667
+ URL : cloneOpts .URL () + "/" + resPath ,
1668
+ IsInternal : true ,
1657
1669
}
1658
1670
if err := appDef .CreateApp (ctx , opts .KubeFactory , cloneOpts , opts .RuntimeName , store .Get ().CFComponentType , "" , "" ); err != nil {
1659
1671
return err
@@ -1681,9 +1693,10 @@ func createEventsReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts
1681
1693
func createReporter (ctx context.Context , cloneOpts * git.CloneOptions , opts * RuntimeInstallOptions , reporterCreateOpts reporterCreateOptions ) error {
1682
1694
resPath := cloneOpts .FS .Join (apstore .Default .AppsDir , reporterCreateOpts .reporterName , opts .RuntimeName , "resources" )
1683
1695
appDef := & runtime.AppDef {
1684
- Name : reporterCreateOpts .reporterName ,
1685
- Type : application .AppTypeDirectory ,
1686
- URL : cloneOpts .URL () + "/" + resPath ,
1696
+ Name : reporterCreateOpts .reporterName ,
1697
+ Type : application .AppTypeDirectory ,
1698
+ URL : cloneOpts .URL () + "/" + resPath ,
1699
+ IsInternal : reporterCreateOpts .IsInternal ,
1687
1700
}
1688
1701
if err := appDef .CreateApp (ctx , opts .KubeFactory , cloneOpts , opts .RuntimeName , store .Get ().CFComponentType , "" , "" ); err != nil {
1689
1702
return err
0 commit comments