Skip to content

Commit

Permalink
fix: 默认禁用 dns_cache 组件
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Jan 5, 2023
1 parent b59d403 commit 8205703
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ require (
)

replace github.com/mattn/go-colorable => github.com/mattn/go-colorable v0.1.8

replace github.com/russross/blackfriday => github.com/russross/blackfriday v1.5.2

replace github.com/mattn/go-isatty => github.com/mattn/go-isatty v0.0.12

replace github.com/nats-io/nats-server/v2 => github.com/nats-io/nats-server/v2 v2.2.1

replace github.com/cespare/xxhash/v2 => github.com/cespare/xxhash/v2 v2.1.2
4 changes: 4 additions & 0 deletions pkg/model/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ func (c Cluster) loadComponentVars(result map[string]string) {
case "gpu":
if c.Status == constant.StatusEnabled {
result[facts.SupportGpuFactName] = constant.StatusEnabled
} else {
result[facts.SupportGpuFactName] = constant.StatusDisabled
}
case "ingress-nginx":
if c.Status == constant.StatusEnabled {
Expand All @@ -587,6 +589,8 @@ func (c Cluster) loadComponentVars(result map[string]string) {
case "dns-cache":
if c.Status == constant.StatusEnabled {
result[facts.EnableDnsCacheFactName] = constant.StatusEnabled
} else {
result[facts.EnableDnsCacheFactName] = constant.StatusDisabled
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/cluster/adm/facts/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var DefaultFacts = map[string]string{
EnableTraefikFactName: "disable",
MetricsServerFactName: "enable",
SupportGpuFactName: "disable",
EnableDnsCacheFactName: "enable",
EnableDnsCacheFactName: "disable",
EnableNpdFactName: "disable",
EnableIstioFactName: "disable",
EnableMetallbFactName: "disable",
Expand Down

0 comments on commit 8205703

Please sign in to comment.