Refine controller template and probe listeners

This commit is contained in:
2026-04-27 00:28:25 +08:00
parent 8fae920fc8
commit d7c2dac944
20 changed files with 780 additions and 217 deletions

View File

@@ -1,15 +1,29 @@
#!/bin/bash
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
OUT_DIR="$( realpath "$SCRIPT_DIR"/../out/ )"
OUT_DIR="$(realpath "$SCRIPT_DIR"/../out/)"
set -e
BASE_URL="http://localhost:8000"
TARGET_VERSION="v$1"
STABLE_VERSION="v1.34.6"
DEFAULT_BASE_URL="http://localhost:8000"
DEFAULT_TARGET_VERSION="v1.34.1"
STABLE_VERSION="v1.34.1"
NAME="my-upgrade-1"
if [ -r /dev/tty ]; then
printf "Enter the base url (%s): " "$DEFAULT_BASE_URL" > /dev/tty
read -r BASE_URL < /dev/tty
printf "Enter the target version (%s): " "$DEFAULT_TARGET_VERSION" > /dev/tty
read -r TARGET_VERSION < /dev/tty
else
echo "No TTY available for interactive input" >&2
exit 1
fi
BASE_URL="${BASE_URL:-$DEFAULT_BASE_URL}"
TARGET_VERSION="${TARGET_VERSION:-$DEFAULT_TARGET_VERSION}"
echo "apiVersion: monok8s.io/v1alpha1"
echo "kind: OSUpgrade"
echo "metadata:"