Skip to content

Commit 0b65575

Browse files
committed
feat(ops): imp docker opt
imp docker opt Signed-off-by: ysicing <i@ysicing.me>
1 parent d2b1c7c commit 0b65575

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

cmd/command/k8s.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ func NewK8sJoinCommand() *cobra.Command {
7575

7676
func NewK8sMasterSchedule() *cobra.Command {
7777
k8sMasterSchedule := &cobra.Command{
78-
Use: "schedule",
79-
Short: "Master节点可以调度pods",
80-
Run: k8sschedulefunc,
78+
Use: "schedule",
79+
Short: "Master节点可以调度pods",
80+
Run: k8sschedulefunc,
8181
}
8282
return k8sMasterSchedule
8383
}
@@ -171,7 +171,7 @@ func k8sjoinfunc(cmd *cobra.Command, args []string) {
171171
k8s.InstallK8s(SSHConfig, ip, klocal, false, kargs, kv)
172172
}
173173

174-
func k8sschedulefunc(cmd *cobra.Command, args []string) {
174+
func k8sschedulefunc(cmd *cobra.Command, args []string) {
175175
runschedule := "kubectl taint nodes --all node-role.kubernetes.io/master-"
176176
tempfile := fmt.Sprintf("/tmp/%v.k8s.tmp.sh", extime.NowUnix())
177177
exfile.WriteFile(tempfile, runschedule)
@@ -180,4 +180,4 @@ func k8sschedulefunc(cmd *cobra.Command, args []string) {
180180
} else {
181181
logger.Slog.Warnf("请在master节点执行.")
182182
}
183-
}
183+
}

ops/base/types.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ curl -fsSL https://gitee.com/godu/install/raw/master/docker/get-docker.sh | bash
99
mkdir /etc/docker
1010
cat > /etc/docker/daemon.json <<EOF
1111
{
12-
"registry-mirrors": ["https://reg-mirror.qiniu.com","https://dyucrs4l.mirror.aliyuncs.com"],
12+
"registry-mirrors": ["https://dyucrs4l.mirror.aliyuncs.com"],
1313
"bip": "172.30.42.1/16",
1414
"max-concurrent-downloads": 10,
1515
"log-driver": "json-file",
1616
"log-level": "warn",
1717
"log-opts": {
18-
"max-size": "20m",
19-
"max-file": "2"
18+
"max-size": "30m",
19+
"max-file": "3"
2020
},
2121
"storage-driver": "overlay2"
2222
}
@@ -204,9 +204,9 @@ const goscript = `
204204
go::install(){
205205
pushd /tmp
206206
# 下载
207-
wget https://dl.google.com/go/go1.15.6.linux-amd64.tar.gz
207+
wget https://dl.google.com/go/go1.15.10.linux-amd64.tar.gz
208208
# 解压
209-
tar -C /usr/local -xzf go1.15.6.linux-amd64.tar.gz
209+
tar -C /usr/local -xzf go1.15.10.linux-amd64.tar.gz
210210
popd
211211
}
212212
@@ -239,11 +239,11 @@ set -e
239239
dl(){
240240
pushd /tmp
241241
# 下载
242-
wget https://github.com/prometheus/node_exporter/releases/download/v1.0.1/node_exporter-1.0.1.linux-amd64.tar.gz
242+
wget https://github.com/prometheus/node_exporter/releases/download/v1.1.2/node_exporter-1.1.2.linux-amd64.tar.gz
243243
# 解压
244-
tar -xzf node_exporter-1.0.1.linux-amd64.tar.gz
245-
rm -rf node_exporter-1.0.1.linux-amd64.tar.gz
246-
mv node_exporter-1.0.1.linux-amd64/node_exporter /usr/local/bin/
244+
tar -xzf node_exporter-1.1.2.linux-amd64.tar.gz
245+
rm -rf node_exporter-1.1.2.linux-amd64.tar.gz
246+
mv node_exporter-1.1.2.linux-amd64/node_exporter /usr/local/bin/
247247
chmod +x /usr/local/bin/node_exporter
248248
popd
249249
}

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.14
1+
1.0.15

0 commit comments

Comments
 (0)