Files
headlamp-sealed-secrets-plugin/install-plugin.sh
T
Chris Farhood d20b9258f8 docs: add Headlamp plugin installation guides and setup script
Add comprehensive installation documentation and automated setup for
Headlamp plugin manager integration.

New files:
- install-plugin.sh: Automated installation script for macOS/Linux
- HEADLAMP_INSTALLATION.md: Complete installation guide covering:
  - Local installation (development/testing)
  - NPM installation (for published plugin)
  - Headlamp server mode
  - Kubernetes deployment with ConfigMaps
  - Troubleshooting common issues
  - Uninstallation instructions
- SETUP_STATUS.md: Quick reference for current setup status

Features:
- Cross-platform support (macOS, Linux, Windows)
- Multiple installation methods documented
- Troubleshooting guide for common issues
- Development mode instructions
- Plugin verification steps

Plugin is now ready for:
 Local Headlamp desktop installation
 Headlamp server deployment
 Kubernetes-based Headlamp with ConfigMaps
 Development with hot reload

Current installation:
- Location: ~/Library/Application Support/Headlamp/plugins/headlamp-sealed-secrets/
- Version: 0.2.0
- Sealed Secrets controller: Running in cluster
- Status: Ready for use

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-11 23:04:12 -05:00

80 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
#
# Install Headlamp Sealed Secrets Plugin
#
# This script builds and installs the plugin to your local Headlamp installation.
#
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Headlamp Sealed Secrets Plugin Installer${NC}"
echo "=========================================="
echo
# Detect OS and set plugin directory
if [[ "$OSTYPE" == "darwin"* ]]; then
PLUGIN_DIR="$HOME/Library/Application Support/Headlamp/plugins/headlamp-sealed-secrets"
echo -e "${YELLOW}Detected: macOS${NC}"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
PLUGIN_DIR="$HOME/.config/Headlamp/plugins/headlamp-sealed-secrets"
echo -e "${YELLOW}Detected: Linux${NC}"
else
echo -e "${RED}Unsupported OS: $OSTYPE${NC}"
echo "For Windows, please see HEADLAMP_INSTALLATION.md"
exit 1
fi
echo "Plugin will be installed to: $PLUGIN_DIR"
echo
# Check if node/npm are available
if ! command -v npm &> /dev/null; then
echo -e "${RED}Error: npm is not installed${NC}"
echo "Please install Node.js and npm first"
exit 1
fi
# Navigate to plugin directory
cd "$(dirname "$0")/headlamp-sealed-secrets"
echo -e "${GREEN}Step 1: Installing dependencies...${NC}"
npm install
echo
echo -e "${GREEN}Step 2: Building plugin...${NC}"
npm run build
echo
echo -e "${GREEN}Step 3: Creating plugin directory...${NC}"
mkdir -p "$PLUGIN_DIR"
echo
echo -e "${GREEN}Step 4: Copying plugin files...${NC}"
cp -v dist/main.js "$PLUGIN_DIR/"
cp -v package.json "$PLUGIN_DIR/"
cp -v README.md "$PLUGIN_DIR/" 2>/dev/null || true
cp -v LICENSE "$PLUGIN_DIR/" 2>/dev/null || true
echo
echo -e "${GREEN}✓ Installation complete!${NC}"
echo
echo "Plugin installed to: $PLUGIN_DIR"
echo
echo "Next steps:"
echo "1. Restart Headlamp desktop application"
echo "2. Open Headlamp and connect to your cluster"
echo "3. Look for 'Sealed Secrets' in the sidebar"
echo
echo "To verify sealed-secrets controller is installed:"
echo " kubectl get pods -n kube-system -l name=sealed-secrets-controller"
echo
echo "To install sealed-secrets controller (if not present):"
echo " kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.24.0/controller.yaml"
echo