tftsr-devops_investigation/scripts/download-kubectl.sh
Shaun Arman 1400f43d7a feat: add kubectl binary bundling for cross-platform support
Download and package kubectl v1.30.0 binaries for Linux (amd64/arm64),
Windows, macOS.

- Add scripts/download-kubectl.sh for kubectl binary management
- Update Cargo.toml dependencies (http 1.4, thiserror 2, rand 0.8)
- Add ollama/installer::start_ollama_service() and find_ollama_binary()
- Fix rand API deprecation (thread_rng deprecated in favor of rng in 0.8)
- Fix AppState initialization in integrations.rs (add pending_approvals)
- Configure kubectl as Tauri sidecar (currently empty array for dev)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-05 08:22:54 -05:00

39 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
set -e
KUBECTL_VERSION="v1.30.0"
BINARIES_DIR="src-tauri/binaries"
echo "Downloading kubectl binaries version ${KUBECTL_VERSION}..."
mkdir -p "$BINARIES_DIR"
# Download for all platforms
# Tauri uses this structure: binaries/kubectl-{target-triple} or kubectl-{target-triple}.exe
echo "Downloading kubectl for Linux x86_64..."
curl -L -o "$BINARIES_DIR/kubectl-x86_64-unknown-linux-gnu" \
"https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
echo "Downloading kubectl for Linux aarch64..."
curl -L -o "$BINARIES_DIR/kubectl-aarch64-unknown-linux-gnu" \
"https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/arm64/kubectl"
echo "Downloading kubectl for macOS x86_64..."
curl -L -o "$BINARIES_DIR/kubectl-x86_64-apple-darwin" \
"https://dl.k8s.io/release/$KUBECTL_VERSION/bin/darwin/amd64/kubectl"
echo "Downloading kubectl for macOS aarch64..."
curl -L -o "$BINARIES_DIR/kubectl-aarch64-apple-darwin" \
"https://dl.k8s.io/release/$KUBECTL_VERSION/bin/darwin/arm64/kubectl"
echo "Downloading kubectl for Windows x86_64..."
curl -L -o "$BINARIES_DIR/kubectl-x86_64-pc-windows-gnu.exe" \
"https://dl.k8s.io/release/$KUBECTL_VERSION/bin/windows/amd64/kubectl.exe"
# Make binaries executable (not needed for Windows .exe)
chmod +x "$BINARIES_DIR"/kubectl-*-linux-* "$BINARIES_DIR"/kubectl-*-darwin
echo "kubectl binaries downloaded successfully to $BINARIES_DIR"
echo "Total size:"
du -sh "$BINARIES_DIR"