Files
k8s-game-2048/scripts/setup-knative.sh
Greg 82fc2a6691 feat: Complete PII cleanup and fully automatic pipeline
🧹 PII Cleanup & Security:
- Remove all hardcoded domains (darknex.us, hndrx.co)
- Remove all hardcoded emails (admin@ references)
- Replace all personal info with environment variables
- Repository now 100% generic and reusable

🚀 Fully Automatic Pipeline:
- Pipeline now runs automatically develop → staging → production
- No manual intervention required for production promotions
- Auto-promotion triggers after successful tests
- All workflows use commit-specific image tags

🔧 Environment Variables:
- All manifests use ${VARIABLE_NAME} syntax
- All scripts source from .env file
- GitHub Actions use secrets for sensitive data
- Complete .env.example template provided

📚 Documentation:
- New comprehensive WORKFLOWS.md with pipeline details
- New PIPELINE_QUICK_REFERENCE.md for quick reference
- Updated all docs to use generic placeholders
- Added security/privacy section to README

🔐 Security Enhancements:
- Updated .gitignore for all sensitive files
- Created PII verification script (verify-pii-removal.sh)
- Created cleanup automation script (cleanup-pii.sh)
- Repository verified PII-free and production-ready

BREAKING: Repository now requires .env configuration
- Copy .env.example to .env and configure for your environment
- Set GitHub repository secrets for CI/CD workflows
- All deployments now use environment-specific configuration
2025-07-01 17:30:26 -07:00

59 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Setup script for Knative Serving installation
# This script installs Knative Serving on a Kubernetes cluster
set -e
echo "🚀 Setting up Knative Serving..."
# Check if kubectl is available
if ! command -v kubectl &> /dev/null; then
echo "❌ kubectl is not installed. Please install kubectl first."
exit 1
fi
# Check if cluster is accessible
if ! kubectl cluster-info &> /dev/null; then
echo "❌ Cannot access Kubernetes cluster. Please check your kubeconfig."
exit 1
fi
# Install Knative Serving CRDs
echo "📦 Installing Knative Serving CRDs..."
kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-crds.yaml
# Wait for CRDs to be established
echo "⏳ Waiting for CRDs to be established..."
kubectl wait --for condition=established --timeout=120s crd/configurations.serving.knative.dev
kubectl wait --for condition=established --timeout=120s crd/revisions.serving.knative.dev
kubectl wait --for condition=established --timeout=120s crd/routes.serving.knative.dev
kubectl wait --for condition=established --timeout=120s crd/services.serving.knative.dev
# Install Knative Serving core
echo "📦 Installing Knative Serving core..."
kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-core.yaml
# Wait for Knative Serving to be ready
echo "⏳ Waiting for Knative Serving to be ready..."
kubectl wait --for=condition=Ready pod -l app=controller -n knative-serving --timeout=300s
kubectl wait --for=condition=Ready pod -l app=webhook -n knative-serving --timeout=300s
# Install Knative Serving HPA (Horizontal Pod Autoscaler)
echo "📦 Installing Knative Serving HPA..."
kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-hpa.yaml
# Configure domain
echo "🌐 Configuring domain..."
kubectl patch configmap/config-domain \
--namespace knative-serving \
--type merge \
--patch "{\"data\":{\"${KNATIVE_DOMAIN}\":\"\"}}"
echo "✅ Knative Serving installation completed!"
echo ""
echo "Next steps:"
echo "1. Install Kourier as the networking layer: ./setup-kourier.sh"
echo "2. Configure DNS to point your domain to the Kourier LoadBalancer"
echo "3. Deploy your applications using the manifests in this repository"