fix(k01): merge secrets.sh into install-k3s.sh and lower operator resource requests
build-and-push-harbor / docker-build-push (push) Waiting to run

This commit is contained in:
zetaloop
2026-05-06 00:52:10 +08:00
parent 4d93678046
commit 45ade5a6a0
2 changed files with 19 additions and 14 deletions
+11 -1
View File
@@ -19,6 +19,15 @@ if [ ! -f /root/registry-password ]; then
exit 1
fi
K01_DIR="$(cd "$(dirname "$0")" && pwd)"
if [ "$MODE" = "server" ] && [ ! -f "${K01_DIR}/.env" ]; then
echo ".env not found in ${K01_DIR}" >&2
echo " cp ${K01_DIR}/.env.example ${K01_DIR}/.env" >&2
echo " nano ${K01_DIR}/.env" >&2
exit 1
fi
write_registries() {
mkdir -p /etc/rancher/k3s
cat > /etc/rancher/k3s/registries.yaml <<EOF
@@ -73,7 +82,6 @@ systemctl restart k3s
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
until kubectl get nodes >/dev/null 2>&1; do sleep 2; done
K01_DIR="$(cd "$(dirname "$0")" && pwd)"
kubectl apply -f "${K01_DIR}/00-base/"
kubectl apply --server-side --force-conflicts -f \
@@ -113,6 +121,8 @@ kubectl -n kafka rollout status deploy/strimzi-cluster-operator --timeout=300s
kubectl -n redis-operator rollout status deploy/redis-operator --timeout=300s
kubectl -n mongodb-operator rollout status deploy/mongodb-kubernetes-operator --timeout=300s
bash "${K01_DIR}/secrets.sh"
echo
echo "k3s server + 4 operators ready"
echo "node token: $(cat /var/lib/rancher/k3s/server/node-token)"