Skip to content

Commit f52a708

Browse files
committed
fix(workflow): CA certificate verification error
1 parent 6af6428 commit f52a708

2 files changed

Lines changed: 13 additions & 22 deletions

File tree

_scripts/install.sh

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,23 @@ EOF
6464
k3s_install_url="https://get.k3s.io"
6565
addons_url="https://github.com/drycc/addons/releases/download/latest/index.yaml"
6666
fi
67+
}
68+
69+
function install_k3s_server {
70+
pre_install_k3s
71+
INSTALL_K3S_EXEC="server ${INSTALL_K3S_EXEC} --flannel-backend=none --disable=traefik --disable=servicelb --cluster-cidr=10.233.0.0/16"
6772
if [[ -z "${K3S_URL}" ]] ; then
68-
INSTALL_K3S_EXEC="${INSTALL_K3S_EXEC} --flannel-backend=none --disable=traefik --disable=servicelb --cluster-cidr=10.233.0.0/16 --cluster-init"
73+
INSTALL_K3S_EXEC="$INSTALL_K3S_EXEC --cluster-init"
6974
fi
75+
curl -sfL "${k3s_install_url}" |INSTALL_K3S_EXEC="$INSTALL_K3S_EXEC" sh -s -
7076
}
7177

72-
function install_k3s {
78+
function install_k3s_agent {
7379
pre_install_k3s
74-
export INSTALL_K3S_EXEC
75-
curl -sfL "${k3s_install_url}" |sh -
80+
curl -sfL "${k3s_install_url}" |INSTALL_K3S_EXEC="$INSTALL_K3S_EXEC" sh -s -
7681
}
7782

83+
7884
function install_components {
7985
mount bpffs -t bpf /sys/fs/bpf
8086
install_helm
@@ -251,23 +257,8 @@ EOF
251257
systemctl restart haproxy
252258
}
253259

254-
# --- add quotes to command arguments ---
255-
quote() {
256-
for arg in "$@"; do
257-
printf '%s\n' "$arg" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/'/"
258-
done
259-
}
260-
261-
# --- escape most punctuation characters, except quotes, forward slash, and space ---
262-
escape() {
263-
printf '%s' "$@" | sed -e 's/\([][!#$%&()*;<=>?\_`{|}]\)/\\\1/g;'
264-
}
265-
266-
# --- re-evaluate args to include env command ---
267-
eval set -- $(escape "${INSTALL_DRYCC_EXEC}") $(quote "$@")
268-
269260
if [[ -z "$@" ]] ; then
270-
install_k3s
261+
install_k3s_server
271262
install_components
272263
install_longhorn
273264
install_drycc

src/quickstart/install-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ $ export K3S_TOKEN="K1078e7213ca32bdaabb44536f14b9ce7926bb201f41c3f3edd39975c16f
163163
* Join the cluster as server:
164164

165165
```
166-
$ curl -sfL https://www.drycc.cc/install.sh | INSTALL_K3S_EXEC=server INSTALL_DRYCC_EXEC=install_k3s bash -
166+
$ curl -sfL https://www.drycc.cc/install.sh | bash -s - install_k3s_server
167167
```
168168

169169
* Join the cluster as agent:
170170

171171
```
172-
$ curl -sfL https://www.drycc.cc/install.sh | INSTALL_K3S_EXEC=agent INSTALL_DRYCC_EXEC=install_k3s bash -
172+
$ curl -sfL https://www.drycc.cc/install.sh | bash -s - install_k3s_agent
173173
```
174174

175175
### Install Options

0 commit comments

Comments
 (0)