Skip to content

Commit

Permalink
Add default project (#3692)
Browse files Browse the repository at this point in the history
Signed-off-by: Yicheng-Lu-llll <[email protected]>
  • Loading branch information
Yicheng-Lu-llll authored May 18, 2023
1 parent 7a8f2f5 commit a50039a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package single

import (
"context"

"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -65,7 +66,12 @@ func startAdmin(ctx context.Context, cfg Admin) error {
}

logger.Infof(ctx, "Seeding default projects...")
if err := adminServer.SeedProjects(ctx, cfg.SeedProjects); err != nil {
projects := []string{"flytesnacks"}
if len(cfg.SeedProjects) != 0 {
projects = cfg.SeedProjects
}
logger.Infof(ctx, "Seeding default projects...",projects)
if err := adminServer.SeedProjects(ctx, projects); err != nil {
return err
}

Expand Down

0 comments on commit a50039a

Please sign in to comment.