Skip to content

Commit

Permalink
Fix endpoint scheme detection for TLS origination to PD (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
LINKIWI authored Aug 11, 2021
1 parent f6c5059 commit c375b81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/tidb-dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ func NewCLIConfig() *DashboardCLIConfig {
}

cfg.CoreConfig.NormalizePublicPathPrefix()
if err := cfg.CoreConfig.NormalizePDEndPoint(); err != nil {
log.Fatal("Invalid PD Endpoint", zap.Error(err))
}

// setup TLS config for TiDB components
if len(*clusterCaPath) != 0 && len(*clusterCertPath) != 0 && len(*clusterKeyPath) != 0 {
Expand All @@ -113,6 +110,10 @@ func NewCLIConfig() *DashboardCLIConfig {
cfg.CoreConfig.TiDBTLSConfig = buildTLSConfig(tidbCaPath, tidbKeyPath, tidbCertPath)
}

if err := cfg.CoreConfig.NormalizePDEndPoint(); err != nil {
log.Fatal("Invalid PD Endpoint", zap.Error(err))
}

// keyvisual check
startTime := cfg.KVFileStartTime
endTime := cfg.KVFileEndTime
Expand Down

0 comments on commit c375b81

Please sign in to comment.