Skip to content

Commit e4bb0bd

Browse files
committed
feat(ns): change default ns
change default ns Signed-off-by: ysicing <[email protected]>
1 parent 6373a15 commit e4bb0bd

File tree

14 files changed

+71
-85
lines changed

14 files changed

+71
-85
lines changed

cmd/manage/resetpassword.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func NewResetPassword(f factory.Factory) *cobra.Command {
5252
log.Errorf("k8s client err: %v", err)
5353
return
5454
}
55-
cneapiDeploy, err := k8sClient.GetDeployment(context.Background(), common.DefaultSystem, "qucheng", metav1.GetOptions{})
55+
cneapiDeploy, err := k8sClient.GetDeployment(context.Background(), common.GetDefaultSystemNamespace(true), "qucheng", metav1.GetOptions{})
5656
if err != nil {
5757
log.Errorf("get k8s deploy err: %v", err)
5858
return

common/const.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ const (
8080
WaitRetryInterval = 5 * time.Second
8181
DefaultHelmRepoName = "install"
8282
DefaultSystem = "cne-system"
83+
DefaultSystemNamespace = "quickon-system"
84+
DefaultAppNamespace = "quickon-app"
8385
DefaultQuchengName = "qucheng"
8486
DefaultCneOperatorName = "cne-operator"
8587
DefaultIngressName = "nginx-ingress-controller"

common/func.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,11 @@ func GetDefaultQuickonPlatformDir(path string) string {
154154
}
155155
return fmt.Sprintf("%s/platform", path)
156156
}
157+
158+
// GetDefaultSystemNamespace get quickon default system ns
159+
func GetDefaultSystemNamespace(newVersion bool) string {
160+
if newVersion {
161+
return DefaultSystemNamespace
162+
}
163+
return DefaultSystem
164+
}

internal/app/debug/fetch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func GetNameByURL(url string, debug, useip bool) (*AppData, error) {
6060
if err != nil {
6161
return nil, err
6262
}
63-
cneapiDeploy, err := k8sClient.GetDeployment(context.Background(), common.DefaultSystem, "qucheng", metav1.GetOptions{})
63+
cneapiDeploy, err := k8sClient.GetDeployment(context.Background(), common.GetDefaultSystemNamespace(true), "qucheng", metav1.GetOptions{})
6464
if err != nil {
6565
return nil, err
6666
}

internal/pkg/cli/tool/domain.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func domainClean(f factory.Factory) *cobra.Command {
5555
secretKey := cfg.ClusterID
5656
if len(secretKey) == 0 {
5757
kclient, _ := k8s.NewSimpleClient()
58-
cm, err := kclient.Clientset.CoreV1().ConfigMaps(common.DefaultSystem).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
58+
cm, err := kclient.Clientset.CoreV1().ConfigMaps(common.GetDefaultSystemNamespace(true)).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
5959
if err != nil {
6060
return
6161
}
@@ -101,12 +101,12 @@ func domainAdd(f factory.Factory) *cobra.Command {
101101
}
102102
if len(customdomain) == 0 {
103103
kclient, _ := k8s.NewSimpleClient()
104-
cm, err := kclient.Clientset.CoreV1().ConfigMaps(common.DefaultSystem).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
104+
cm, err := kclient.Clientset.CoreV1().ConfigMaps(common.GetDefaultSystemNamespace(true)).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
105105
if err != nil {
106106
if errors.IsNotFound(err) {
107107
log.Debug("q-suffix-host not found, create it")
108-
cm = suffixdomain.GenerateSuffixConfigMap("q-suffix-host", common.DefaultSystem)
109-
if _, err := kclient.Clientset.CoreV1().ConfigMaps(common.DefaultSystem).Create(context.TODO(), cm, metav1.CreateOptions{}); err != nil {
108+
cm = suffixdomain.GenerateSuffixConfigMap("q-suffix-host", common.GetDefaultSystemNamespace(true))
109+
if _, err := kclient.Clientset.CoreV1().ConfigMaps(common.GetDefaultSystemNamespace(true)).Create(context.TODO(), cm, metav1.CreateOptions{}); err != nil {
110110
log.Errorf("k8s api err: %v", err)
111111
return
112112
}
@@ -130,14 +130,14 @@ func domainAdd(f factory.Factory) *cobra.Command {
130130
// save config
131131
cfg.SaveConfig()
132132
// upgrade qucheng
133-
helmClient, _ := helm.NewClient(&helm.Config{Namespace: common.DefaultSystem})
133+
helmClient, _ := helm.NewClient(&helm.Config{Namespace: common.GetDefaultSystemNamespace(true)})
134134
if err := helmClient.UpdateRepo(); err != nil {
135135
log.Warnf("update repo failed, reason: %v", err)
136136
}
137-
if err := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/hack/haogstls/haogs.yaml", common.GetDefaultDataDir()), "-n", common.DefaultSystem).Run(); err != nil {
138-
log.Warnf("load tls cert for %s failed, reason: %v", common.DefaultSystem, err)
137+
if err := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/hack/haogstls/haogs.yaml", common.GetDefaultDataDir()), "-n", common.GetDefaultSystemNamespace(true)).Run(); err != nil {
138+
log.Warnf("load tls cert for %s failed, reason: %v", common.GetDefaultSystemNamespace(true), err)
139139
} else {
140-
log.Donef("load tls cert for %s success", common.DefaultSystem)
140+
log.Donef("load tls cert for %s success", common.GetDefaultSystemNamespace(true))
141141
}
142142
if err := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/hack/haogstls/haogs.yaml", common.GetDefaultDataDir()), "-n", "default").Run(); err != nil {
143143
log.Warnf("load tls cert for default failed, reason: %v", err)

internal/pkg/cluster/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ func (p *Cluster) InitK3sCluster() error {
330330
p.Log.Donef("create kubeconfig soft link %v ---> %v", common.GetDefaultQuickonPlatformDir(p.DataDir), common.K3sDefaultDir)
331331
kclient, _ := k8s.NewSimpleClient()
332332
if kclient != nil {
333-
_, err = kclient.CreateNamespace(context.TODO(), common.DefaultSystem, metav1.CreateOptions{})
333+
_, err = kclient.CreateNamespace(context.TODO(), common.GetDefaultSystemNamespace(true), metav1.CreateOptions{})
334334
if err == nil {
335-
p.Log.Donef("create namespace %s", common.DefaultSystem)
335+
p.Log.Donef("create namespace %s", common.GetDefaultSystemNamespace(true))
336336
}
337337
p.KubeClient = kclient
338338
}

internal/pkg/cluster/qucheng.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ func (p *Cluster) genQuChengToken() string {
3333

3434
func (p *Cluster) getOrCreateUUIDAndAuth() (auth string, err error) {
3535
// cm := &corev1.ConfigMap{}
36-
cm, err := p.KubeClient.Clientset.CoreV1().ConfigMaps(common.DefaultSystem).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
36+
cm, err := p.KubeClient.Clientset.CoreV1().ConfigMaps(common.GetDefaultSystemNamespace(true)).Get(context.TODO(), "q-suffix-host", metav1.GetOptions{})
3737
if err != nil {
3838
if !errors.IsNotFound(err) {
3939
return "", err
4040
}
4141
if errors.IsNotFound(err) {
4242
p.Log.Debug("q-suffix-host not found, create it")
43-
cm = suffixdomain.GenerateSuffixConfigMap("q-suffix-host", common.DefaultSystem)
44-
if _, err := p.KubeClient.Clientset.CoreV1().ConfigMaps(common.DefaultSystem).Create(context.TODO(), cm, metav1.CreateOptions{}); err != nil {
43+
cm = suffixdomain.GenerateSuffixConfigMap("q-suffix-host", common.GetDefaultSystemNamespace(true))
44+
if _, err := p.KubeClient.Clientset.CoreV1().ConfigMaps(common.GetDefaultSystemNamespace(true)).Create(context.TODO(), cm, metav1.CreateOptions{}); err != nil {
4545
return "", err
4646
}
4747
}
@@ -83,7 +83,7 @@ func (p *Cluster) InstallQuCheng() error {
8383
}
8484
}
8585

86-
_, err := p.KubeClient.CreateNamespace(ctx, common.DefaultSystem, metav1.CreateOptions{})
86+
_, err := p.KubeClient.CreateNamespace(ctx, common.GetDefaultSystemNamespace(true), metav1.CreateOptions{})
8787
if err != nil {
8888
if !errors.IsAlreadyExists(err) {
8989
return err
@@ -117,7 +117,7 @@ func (p *Cluster) InstallQuCheng() error {
117117
if _, err := os.Stat(defaultTLS); err == nil {
118118
p.Log.StopWait()
119119
p.Log.Done("download tls cert success")
120-
if err := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", defaultTLS, "-n", common.DefaultSystem).Run(); err != nil {
120+
if err := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", defaultTLS, "-n", common.GetDefaultSystemNamespace(true)).Run(); err != nil {
121121
p.Log.Warnf("load default tls cert failed, reason: %v", err)
122122
} else {
123123
p.Log.Done("load default tls cert success")
@@ -151,14 +151,14 @@ func (p *Cluster) InstallQuCheng() error {
151151
cfg.SaveConfig()
152152
chartversion := common.GetVersion(p.QuchengVersion)
153153
p.Log.Info("start deploy cne custom tools")
154-
toolargs := []string{"experimental", "helm", "upgrade", "--name", "selfcert", "--repo", common.DefaultHelmRepoName, "--chart", "selfcert", "--namespace", common.DefaultSystem}
154+
toolargs := []string{"experimental", "helm", "upgrade", "--name", "selfcert", "--repo", common.DefaultHelmRepoName, "--chart", "selfcert", "--namespace", common.GetDefaultSystemNamespace(true)}
155155
if helmstd, err := qcexec.Command(os.Args[0], toolargs...).CombinedOutput(); err != nil {
156156
p.Log.Warnf("deploy cne custom tools err: %v, std: %s", err, string(helmstd))
157157
} else {
158158
p.Log.Done("deployed cne custom tools success")
159159
}
160160
p.Log.Info("start deploy cne operator")
161-
operatorargs := []string{"experimental", "helm", "upgrade", "--name", common.DefaultCneOperatorName, "--repo", common.DefaultHelmRepoName, "--chart", common.DefaultCneOperatorName, "--namespace", common.DefaultSystem,
161+
operatorargs := []string{"experimental", "helm", "upgrade", "--name", common.DefaultCneOperatorName, "--repo", common.DefaultHelmRepoName, "--chart", common.DefaultCneOperatorName, "--namespace", common.GetDefaultSystemNamespace(true),
162162
"--set", "minio.ingress.enabled=true",
163163
"--set", "minio.ingress.host=s3." + p.Domain,
164164
"--set", "minio.auth.username=" + cfg.S3.Username,
@@ -173,7 +173,7 @@ func (p *Cluster) InstallQuCheng() error {
173173
p.Log.Done("deployed cne-operator success")
174174
}
175175
helmchan := common.GetChannel(p.QuchengVersion)
176-
helmargs := []string{"experimental", "helm", "upgrade", "--name", common.DefaultQuchengName, "--repo", common.DefaultHelmRepoName, "--chart", common.DefaultQuchengName, "--namespace", common.DefaultSystem, "--set", "env.APP_DOMAIN=" + p.Domain, "--set", "env.CNE_API_TOKEN=" + token, "--set", "cloud.defaultChannel=" + helmchan}
176+
helmargs := []string{"experimental", "helm", "upgrade", "--name", common.DefaultQuchengName, "--repo", common.DefaultHelmRepoName, "--chart", common.DefaultQuchengName, "--namespace", common.GetDefaultSystemNamespace(true), "--set", "env.APP_DOMAIN=" + p.Domain, "--set", "env.CNE_API_TOKEN=" + token, "--set", "cloud.defaultChannel=" + helmchan}
177177
if helmchan != "stable" {
178178
helmargs = append(helmargs, "--set", "env.PHP_DEBUG=2")
179179
helmargs = append(helmargs, "--set", "cloud.switchChannel=true")

internal/pkg/plugin/plugin.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (p *Item) UnInstall() error {
9999
return nil
100100
}
101101
pluginName := fmt.Sprintf("qc-plugin-%s", p.Type)
102-
_, err := p.Client.GetSecret(context.TODO(), common.DefaultSystem, pluginName, metav1.GetOptions{})
102+
_, err := p.Client.GetSecret(context.TODO(), common.GetDefaultSystemNamespace(true), pluginName, metav1.GetOptions{})
103103
if err != nil {
104104
if errors.IsNotFound(err) {
105105
p.log.Warnf("plugin %s is already uninstalled", p.Type)
@@ -110,27 +110,27 @@ func (p *Item) UnInstall() error {
110110
}
111111
// #nosec
112112
if p.Tool == "helm" {
113-
applycmd := qcexec.Command(os.Args[0], "experimental", "helm", "delete", p.Type, "-n", common.DefaultSystem)
113+
applycmd := qcexec.Command(os.Args[0], "experimental", "helm", "delete", p.Type, "-n", common.GetDefaultSystemNamespace(true))
114114
if output, err := applycmd.CombinedOutput(); err != nil {
115115
p.log.Errorf("helm uninstall %s plugin %s failed: %s", p.Type, p.Name, string(output))
116116
return err
117117
}
118118
} else {
119119
// #nosec
120-
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "delete", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.DefaultSystem)
120+
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "delete", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.GetDefaultSystemNamespace(true))
121121
if output, err := applycmd.CombinedOutput(); err != nil {
122122
p.log.Errorf("kubectl uninstall %s plugin %s failed: %s", p.Type, p.Name, string(output))
123123
return err
124124
}
125125
}
126126
p.log.Donef("uninstall %s plugin success.", p.Type)
127-
p.Client.DeleteSecret(context.TODO(), common.DefaultSystem, pluginName, metav1.DeleteOptions{})
127+
p.Client.DeleteSecret(context.TODO(), common.GetDefaultSystemNamespace(true), pluginName, metav1.DeleteOptions{})
128128
return nil
129129
}
130130

131131
func (p *Item) Install() error {
132132
pluginName := fmt.Sprintf("qc-plugin-%s", p.Type)
133-
oldSecret, err := p.Client.GetSecret(context.TODO(), common.DefaultSystem, pluginName, metav1.GetOptions{})
133+
oldSecret, err := p.Client.GetSecret(context.TODO(), common.GetDefaultSystemNamespace(true), pluginName, metav1.GetOptions{})
134134
updatestatus := false
135135
if err == nil {
136136
nowversion := gv.MustParse(strings.TrimPrefix(p.Version, "v"))
@@ -149,7 +149,7 @@ func (p *Item) Install() error {
149149
}
150150
}
151151
if p.Tool == "helm" {
152-
args := []string{"experimental", "helm", "upgrade", "--name", p.Type, "--repo", common.DefaultHelmRepoName, "--chart", p.Path, "--namespace", common.DefaultSystem}
152+
args := []string{"experimental", "helm", "upgrade", "--name", p.Type, "--repo", common.DefaultHelmRepoName, "--chart", p.Path, "--namespace", common.GetDefaultSystemNamespace(true)}
153153
if len(p.InstallVersion) > 0 {
154154
args = append(args, "--version", p.InstallVersion)
155155
}
@@ -160,7 +160,7 @@ func (p *Item) Install() error {
160160
}
161161
} else {
162162
// #nosec
163-
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.DefaultSystem)
163+
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.GetDefaultSystemNamespace(true))
164164
if output, err := applycmd.CombinedOutput(); err != nil {
165165
p.log.Errorf("kubectl install %s plugin %s failed: %s", p.Type, p.Name, string(output))
166166
return err
@@ -175,14 +175,14 @@ func (p *Item) Install() error {
175175
"cliversion": common.Version,
176176
}
177177
if updatestatus {
178-
_, err = p.Client.UpdateSecret(context.TODO(), common.DefaultSystem, &corev1.Secret{
178+
_, err = p.Client.UpdateSecret(context.TODO(), common.GetDefaultSystemNamespace(true), &corev1.Secret{
179179
ObjectMeta: metav1.ObjectMeta{
180180
Name: pluginName,
181181
},
182182
StringData: plugindata,
183183
}, metav1.UpdateOptions{})
184184
} else {
185-
_, err = p.Client.CreateSecret(context.TODO(), common.DefaultSystem, &corev1.Secret{
185+
_, err = p.Client.CreateSecret(context.TODO(), common.GetDefaultSystemNamespace(true), &corev1.Secret{
186186
ObjectMeta: metav1.ObjectMeta{
187187
Name: pluginName,
188188
},
@@ -195,21 +195,21 @@ func (p *Item) Install() error {
195195

196196
func (p *Item) Upgrade() (err error) {
197197
pluginName := fmt.Sprintf("qc-plugin-%s", p.Type)
198-
oldSecret, _ := p.Client.GetSecret(context.TODO(), common.DefaultSystem, pluginName, metav1.GetOptions{})
198+
oldSecret, _ := p.Client.GetSecret(context.TODO(), common.GetDefaultSystemNamespace(true), pluginName, metav1.GetOptions{})
199199
updatestatus := true
200200
if oldSecret == nil {
201201
updatestatus = false
202202
}
203203

204204
if p.Tool == "helm" {
205-
applycmd := qcexec.Command(os.Args[0], "experimental", "helm", "upgrade", "--name", p.Type, "--repo", common.DefaultHelmRepoName, "--chart", p.Path, "--namespace", common.DefaultSystem)
205+
applycmd := qcexec.Command(os.Args[0], "experimental", "helm", "upgrade", "--name", p.Type, "--repo", common.DefaultHelmRepoName, "--chart", p.Path, "--namespace", common.GetDefaultSystemNamespace(true))
206206
if output, err := applycmd.CombinedOutput(); err != nil {
207207
p.log.Errorf("helm upgrade %s plugin %s failed: %s", p.Type, p.Name, string(output))
208208
return err
209209
}
210210
} else {
211211
// #nosec
212-
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.DefaultSystem)
212+
applycmd := qcexec.Command(os.Args[0], "experimental", "kubectl", "apply", "-f", fmt.Sprintf("%s/%s", common.GetDefaultDataDir(), p.Path), "-n", common.GetDefaultSystemNamespace(true))
213213
if output, err := applycmd.CombinedOutput(); err != nil {
214214
p.log.Errorf("kubectl upgrade %s plugin %s failed: %s", p.Type, p.Name, string(output))
215215
return err
@@ -224,9 +224,9 @@ func (p *Item) Upgrade() (err error) {
224224
}
225225
if updatestatus {
226226
oldSecret.StringData = plugindata
227-
_, err = p.Client.UpdateSecret(context.TODO(), common.DefaultSystem, oldSecret, metav1.UpdateOptions{})
227+
_, err = p.Client.UpdateSecret(context.TODO(), common.GetDefaultSystemNamespace(true), oldSecret, metav1.UpdateOptions{})
228228
} else {
229-
_, err = p.Client.CreateSecret(context.TODO(), common.DefaultSystem, &corev1.Secret{
229+
_, err = p.Client.CreateSecret(context.TODO(), common.GetDefaultSystemNamespace(true), &corev1.Secret{
230230
ObjectMeta: metav1.ObjectMeta{
231231
Name: pluginName,
232232
},

internal/pkg/status/k8s.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ func (k *K8sStatusCollector) quchengStatus(ctx context.Context, status *Status)
151151
k.deploymentStatus(ctx, "kube-system", "metrics-server", "metrics-server", "k8s", status)
152152
k.deploymentStatus(ctx, "kube-system", "local-path-provisioner", "local-path-provisioner", "k8s", status)
153153
// 业务层
154-
k.deploymentStatus(ctx, common.DefaultSystem, common.DefaultQuchengName, common.DefaultQuchengName, "", status)
154+
k.deploymentStatus(ctx, common.GetDefaultSystemNamespace(true), common.DefaultQuchengName, common.DefaultQuchengName, "", status)
155155
// 数据库
156-
k.deploymentStatus(ctx, common.DefaultSystem, common.DefaultDBName, common.DefaultDBName, "", status)
156+
k.deploymentStatus(ctx, common.GetDefaultSystemNamespace(true), common.DefaultDBName, common.DefaultDBName, "", status)
157157

158158
// 插件状态
159159
plugins, _ := plugin.GetMaps()
@@ -166,15 +166,15 @@ func (k *K8sStatusCollector) quchengStatus(ctx context.Context, status *Status)
166166
func (k *K8sStatusCollector) quchengPluginStatus(ctx context.Context, p plugin.Meta, status *Status) error {
167167
k.option.Log.Debugf("check plugin %s status", p.Type)
168168
stateCount := PodStateCount{Type: "Plugin"}
169-
_, err := k.client.GetSecret(ctx, common.DefaultSystem, "qc-plugin-"+p.Type, metav1.GetOptions{})
169+
_, err := k.client.GetSecret(ctx, common.GetDefaultSystemNamespace(true), "qc-plugin-"+p.Type, metav1.GetOptions{})
170170
if err != nil {
171171
stateCount.Disabled = true
172172
} else {
173173
stateCount.Disabled = false
174174
if p.Type == "ingress" {
175-
k.deploymentStatus(ctx, common.DefaultSystem, fmt.Sprintf("ingress-%s", common.DefaultIngressName), common.DefaultIngressName, "", status)
175+
k.deploymentStatus(ctx, common.GetDefaultSystemNamespace(true), fmt.Sprintf("ingress-%s", common.DefaultIngressName), common.DefaultIngressName, "", status)
176176
} else if p.Type == "cne-operator" {
177-
k.deploymentStatus(ctx, common.DefaultSystem, common.DefaultCneOperatorName, common.DefaultCneOperatorName, "", status)
177+
k.deploymentStatus(ctx, common.GetDefaultSystemNamespace(true), common.DefaultCneOperatorName, common.DefaultCneOperatorName, "", status)
178178
}
179179
}
180180
status.QStatus.PluginState[p.Type] = stateCount

internal/pkg/status/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (s *Status) Format() error {
110110
}
111111
fmt.Fprintf(w, "\n")
112112
fmt.Fprintf(w, "Qucheng Status: \n")
113-
fmt.Fprintf(w, " namespace:\t%s\n", color.SBlue(common.DefaultSystem))
113+
fmt.Fprintf(w, " namespace:\t%s\n", color.SBlue(common.GetDefaultSystemNamespace(true)))
114114
cfg, _ := config.LoadConfig()
115115
domain := ""
116116
loginip := exnet.LocalIPs()[0]

0 commit comments

Comments
 (0)