Skip to content

Commit 4ef6da8

Browse files
committed
chore(workflow): clear cilium
1 parent 10f1b53 commit 4ef6da8

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

_scripts/install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,19 @@ function check_metallb {
264264

265265
function install_network() {
266266
echo -e "\\033[32m---> Start installing network...\\033[0m"
267-
kubernetes_service_host=(`kubectl get svc kubernetes -o jsonpath='{$.spec.clusterIP}'`)
268-
kubernetes_service_port=(`kubectl get svc kubernetes -o jsonpath='{$.spec.ports[0].port}'`)
267+
kubernetes_service_host=(`ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'`)
269268
helm install cilium $CHARTS_URL/cilium \
270269
--set endpointHealthChecking.enabled=false \
271270
--set healthChecking=false \
272271
--set operator.replicas=1 \
273272
--set bpf.masquerade=true \
274273
--set bandwidthManager.enabled=true \
275274
--set bandwidthManager.bbr=true \
276-
--set kubeProxyReplacement=strict \
275+
--set kubeProxyReplacement=true \
277276
--set hubble.enabled=false \
278277
--set hostPort.enabled=true \
279278
--set k8sServiceHost=${KUBERNETES_SERVICE_HOST:-$kubernetes_service_host} \
280-
--set k8sServicePort=${KUBERNETES_SERVICE_PORT:-$kubernetes_service_port} \
279+
--set k8sServicePort=${KUBERNETES_SERVICE_PORT:-6443} \
281280
--set prometheus.enabled=true \
282281
--set operator.prometheus.enabled=true \
283282
--namespace kube-system --wait

_scripts/uninstall.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
set -eo pipefail
33
shopt -s expand_aliases
44

5+
ip link delete cilium_host
6+
ip link delete cilium_net
7+
ip link delete cilium_vxlan
8+
ip link delete nodelocaldns
9+
510
/usr/local/bin/k3s-killall.sh
611

712
if [[ -x /usr/local/bin/k3s-uninstall.sh ]] ; then
@@ -16,10 +21,10 @@ if [[ -n "${K3S_DATA_DIR}" ]] ; then
1621
rm -rf "${K3S_DATA_DIR}/rancher"
1722
fi
1823

19-
if [[ -n "${LONGHORN_DATA_PATH}" ]] ; then
20-
rm -rf "${LONGHORN_DATA_PATH}/longhorn"
21-
fi
24+
iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat && iptables -P FORWARD ACCEPT
2225

2326
rm -rf /etc/rancher
27+
rm -rf /etc/cni/net.d/*
28+
rm -rf /var/lib/rancher/
2429
rm -rf /usr/local/bin/*runsc* /usr/local/bin/crun
2530
rm -rf /usr/local/bin/helm ~/.config/helm

src/quickstart/install-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ DRYCC_ADMIN_PASSWORD | Required item, specify drycc's
192192
CERT_MANAGER_ENABLED | Whether to use automatic certificate. It is `true` by default
193193
CHANNEL | By default, `stable` channel will be installed. You can also specify `testing`
194194
CONTAINERD_FILE | The `config.yaml` file path used by containerd
195-
KUBERNETES_SERVICE_HOST | Set with the IP address of the loadbalancer that was in front of kube-apiserver, The default is the IP address of the current node
196-
KUBERNETES_SERVICE_PORT | Set with the PORT of the loadbalancer that was in front of kube-apiserver, which is `6443` by default
195+
KUBERNETES_SERVICE_HOST | Set with the HOST of the loadbalancer that was in front of kube-apiserver
196+
KUBERNETES_SERVICE_PORT | Set with the PORT of the loadbalancer that was in front of kube-apiserver
197197
METALLB_CONFIG_FILE | The metallb config file path, layer 2 network is used by default
198198
INSTALL_DRYCC_MIRROR | Specify the accelerated mirror location. Currently, only `cn` is supported
199199
BUILDER_REPLICAS | Number of builder replicas to deploy

0 commit comments

Comments
 (0)