Skip to content

Commit

Permalink
fix(domain): fix domain #10
Browse files Browse the repository at this point in the history
fix domain #10

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Sep 8, 2023
1 parent e1fe869 commit b94dd9d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (
ControlPlaneNumCPU = 2
// ControlPlaneMem is the number of megabytes of memory required on the control-plane
// Below that amount of RAM running a stable control plane would be difficult.
ControlPlaneMem = 1700
ControlPlaneMem = 3800
// ControlPlaneNumDisk is the number of Disk required on control-plane
ControlPlaneNumDisk = 40
// ControlPlaneLowDisk is the number of Disk required on node
Expand Down
1 change: 0 additions & 1 deletion internal/pkg/cli/tool/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func domainAdd(f factory.Factory) *cobra.Command {
}
// save config
cfg.SaveConfig()
// upgrade qucheng
helmClient, _ := helm.NewClient(&helm.Config{Namespace: common.GetDefaultSystemNamespace(true)})
if err := helmClient.UpdateRepo(); err != nil {
log.Warnf("update repo failed, reason: %v", err)
Expand Down
8 changes: 2 additions & 6 deletions internal/pkg/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,14 @@ func (s *Status) Format() error {
consoleURL := ""
if len(domain) > 0 {
// TODO 优化域名显示结果
if !kutil.IsLegalDomain(domain) {
if cfg.Quickon.Domain.Type != "api" || !kutil.IsLegalDomain(domain) {
if cfg.Quickon.DevOps {
consoleURL = fmt.Sprintf("http://zentao.%s", domain)
} else {
consoleURL = fmt.Sprintf("http://console.%s", domain)
}
} else {
if cfg.Quickon.Domain.Type == "custom" {
consoleURL = fmt.Sprintf("http://%s", domain)
} else {
consoleURL = fmt.Sprintf("https://%s", domain)
}
consoleURL = fmt.Sprintf("http://%s", domain)
}
} else {
consoleURL = fmt.Sprintf("http://%s:32379", loginIP)
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/devops/devops.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func newProvider() *Devops {
DevopsMode: true,
Type: common.ZenTaoOSSType.String(),
Version: common.DefaultZentaoDevOPSOSSVersion,
DomainType: "custom",
},
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/quickon/quickon.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func newProvider() *Quickon {
Type: common.ZenTaoOSSType.String(),
Version: common.DefaultQuickonOSSVersion,
App: "zentao",
DomainType: "custom",
},
}
}
Expand Down

0 comments on commit b94dd9d

Please sign in to comment.