Skip to content

Commit

Permalink
fix: port-forward minio when opening the dashboard for enterprise (#5483
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nicufk authored May 29, 2024
1 parent 189657a commit f7bbea5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
6 changes: 6 additions & 0 deletions cmd/kubectl-testkube/commands/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func openOnPremDashboard(cmd *cobra.Command, cfg config.Data, verbose bool, lice
}
ui.ExitOnError("port forwarding dex", err)

err = k8sclient.PortForward(ctx, cfg.Namespace, config.EnterpriseMinioName, config.EnterpriseMinioPort, config.EnterpriseMinioPortFrwardingPort, verbose)
if err != nil {
errs = append(errs, err)

Check failure on line 90 in cmd/kubectl-testkube/commands/dashboard.go

View workflow job for this annotation

GitHub Actions / Unit Tests

undefined: errs

Check failure on line 90 in cmd/kubectl-testkube/commands/dashboard.go

View workflow job for this annotation

GitHub Actions / Unit Tests

undefined: errs

Check failure on line 90 in cmd/kubectl-testkube/commands/dashboard.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: errs

Check failure on line 90 in cmd/kubectl-testkube/commands/dashboard.go

View workflow job for this annotation

GitHub Actions / Integration Tests

undefined: errs
}
ui.PrintOnError("port forwarding minio", err)

err = open.Run(uri)
if err != nil {
sendErrTelemetry(cmd, cfg, "open_dashboard", license, "opening dashboard", err)
Expand Down
27 changes: 15 additions & 12 deletions cmd/kubectl-testkube/config/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ import (
)

const (
APIServerName string = "testkube-api-server"
APIServerPort int = 8088
DashboardName string = "testkube-dashboard"
DashboardPort int = 8080
EnterpriseUiName string = "testkube-enterprise-ui"
EnterpriseUiPort int = 8080
EnterpriseApiName string = "testkube-enterprise-api"
EnterpriseApiPort int = 8088
EnterpriseApiForwardingPort int = 8090
EnterpriseDexName string = "testkube-enterprise-dex"
EnterpriseDexPort int = 5556
EnterpriseDexForwardingPort int = 5556
APIServerName string = "testkube-api-server"
APIServerPort int = 8088
DashboardName string = "testkube-dashboard"
DashboardPort int = 8080
EnterpriseUiName string = "testkube-enterprise-ui"
EnterpriseUiPort int = 8080
EnterpriseApiName string = "testkube-enterprise-api"
EnterpriseApiPort int = 8088
EnterpriseApiForwardingPort int = 8090
EnterpriseDexName string = "testkube-enterprise-dex"
EnterpriseDexPort int = 5556
EnterpriseDexForwardingPort int = 5556
EnterpriseMinioName string = "testkube-enterprise-minio"
EnterpriseMinioPort int = 9000
EnterpriseMinioPortFrwardingPort int = 9000

configDirName = ".testkube"
configFile = "config.json"
Expand Down

0 comments on commit f7bbea5

Please sign in to comment.