Skip to content

Commit d805643

Browse files
committed
fix(issue): #15 #16 #17
1 parent 13d1441 commit d805643

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

common/const.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
ControlPlaneNumCPU = 2
3535
// ControlPlaneMem is the number of megabytes of memory required on the control-plane
3636
// Below that amount of RAM running a stable control plane would be difficult.
37-
ControlPlaneMem = 3800
37+
ControlPlaneMem = 3700
3838
// ControlPlaneNumDisk is the number of Disk required on control-plane
3939
ControlPlaneNumDisk = 40
4040
// ControlPlaneLowDisk is the number of Disk required on node

hack/manifests/scripts/cleankube.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,22 @@ ip6tables-save | grep -v KUBE- | grep -v CNI- | grep -v flannel | ip6tables-rest
106106

107107
if command -v systemctl; then
108108
if [ -f "/etc/systemd/system/k3s.service" ]; then
109-
systemctl disable k3s.service
110-
systemctl reset-failed k3s
109+
systemctl disable k3s
110+
systemctl reset-failed k3s
111111
rm -f /etc/systemd/system/k3s.service
112112
fi
113+
if [ -f "/etc/systemd/system/chartrepo.service" ]; then
114+
systemctl disable chartrepo
115+
systemctl reset-failed chartrepo
116+
rm -f /etc/systemd/system/chartrepo.service
117+
fi
118+
if [ -f "/etc/systemd/system/docker-registry.service" ]; then
119+
systemctl disable docker-registry
120+
systemctl reset-failed docker-registry
121+
rm -f /etc/systemd/system/docker-registry.service
122+
fi
113123
[ -f "/etc/systemd/system/k3s.service.env" ] && rm -f /etc/systemd/system/k3s.service.env
114-
systemctl daemon-reload
124+
systemctl daemon-reload
115125
fi
116126

117127
if (ls /etc/systemd/system/k3s*.service || ls /etc/init.d/k3s*) >/dev/null 2>&1; then

pkg/quickon/quickon.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type Meta struct {
4444
DevopsMode bool
4545
OffLine bool
4646
SkipDevOPSInit bool
47+
DBReplication bool
4748
Type string
4849
App string
4950
kubeClient *k8s.Client
@@ -89,6 +90,12 @@ func (m *Meta) GetCustomFlags() []types.Flag {
8990
P: &m.SkipDevOPSInit,
9091
V: false,
9192
},
93+
{
94+
Name: "db-replication",
95+
Usage: "db use replication mode, default standalone: false",
96+
P: &m.DBReplication,
97+
V: false,
98+
},
9299
}
93100
}
94101

@@ -340,6 +347,11 @@ func (m *Meta) Init() error {
340347
helmargs = append(helmargs, "--set", "env.ZT_SKIP_DEVOPS_INIT=true")
341348
}
342349

350+
if m.DBReplication {
351+
helmargs = append(helmargs, "--set", "mysql.replication.enabled=true")
352+
helmargs = append(helmargs, "--set", "env.ENABLE_DB_SLAVE=true")
353+
}
354+
343355
helmargs = append(helmargs, "--set", fmt.Sprintf("ingress.host=%s", hostdomain))
344356

345357
if m.DevopsMode {

0 commit comments

Comments
 (0)