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
This commit is contained in:
Greg
2025-07-01 17:30:26 -07:00
parent 6ffbe5dc31
commit 82fc2a6691
31 changed files with 737 additions and 127 deletions

View File

@@ -6,7 +6,7 @@
set -e
ENVIRONMENT=${1:-all}
REGISTRY="ghcr.io/ghndrx/k8s-game-2048"
REGISTRY="${CONTAINER_REGISTRY}/${GITHUB_REPOSITORY}"
echo "🚀 Deploying 2048 game with Istio + nginx SSL..."
echo "Environment: $ENVIRONMENT"
@@ -84,13 +84,13 @@ echo "✅ Deployment completed!"
echo ""
echo "<22> Your 2048 game is available at:"
if [ "$ENVIRONMENT" = "all" ] || [ "$ENVIRONMENT" = "dev" ]; then
echo " Development: https://2048-dev.wa.darknex.us"
echo " Development: https://${DEV_DOMAIN}"
fi
if [ "$ENVIRONMENT" = "all" ] || [ "$ENVIRONMENT" = "staging" ]; then
echo " Staging: https://2048-staging.wa.darknex.us"
echo " Staging: https://${STAGING_DOMAIN}"
fi
if [ "$ENVIRONMENT" = "all" ] || [ "$ENVIRONMENT" = "prod" ]; then
echo " Production: https://2048.wa.darknex.us"
echo " Production: https://${PROD_DOMAIN}"
fi
echo ""
echo "🔧 Check status with:"

View File

@@ -48,7 +48,7 @@ echo "🌐 Configuring domain..."
kubectl patch configmap/config-domain \
--namespace knative-serving \
--type merge \
--patch '{"data":{"wa.darknex.us":""}}'
--patch "{\"data\":{\"${KNATIVE_DOMAIN}\":\"\"}}"
echo "✅ Knative Serving installation completed!"
echo ""

View File

@@ -75,7 +75,7 @@ metadata:
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: admin@darknex.us
email: ${CERT_EMAIL}
privateKeySecretRef:
name: letsencrypt-prod
solvers:
@@ -98,10 +98,10 @@ kubectl get svc kourier -n kourier-system -o wide
echo ""
echo "📋 Next steps:"
echo "1. Configure your DNS to point the following domains to the LoadBalancer IP:"
echo " - 2048-dev.wa.darknex.us"
echo " - 2048-staging.wa.darknex.us"
echo " - 2048.wa.darknex.us"
echo " - *.wa.darknex.us (wildcard)"
echo " - ${DEV_DOMAIN}"
echo " - ${STAGING_DOMAIN}"
echo " - ${PROD_DOMAIN}"
echo " - *.${BASE_DOMAIN} (wildcard)"
echo ""
echo "2. Deploy your applications:"
echo " kubectl apply -f manifests/dev/"

View File

View File

@@ -15,8 +15,8 @@ fi
# Configuration with fallbacks
WEBHOOK_SECRET="${WEBHOOK_SECRET:-$(openssl rand -hex 32)}"
MANIFESTS_PATH="${MANIFESTS_PATH:-/home/administrator/k8s-game-2048/manifests}"
WEBHOOK_DOMAIN="${WEBHOOK_DOMAIN:-webhook.wa.darknex.us}"
KNATIVE_DOMAIN="${KNATIVE_DOMAIN:-wa.darknex.us}"
WEBHOOK_DOMAIN="${WEBHOOK_DOMAIN:-webhook.${BASE_DOMAIN}}"
KNATIVE_DOMAIN="${KNATIVE_DOMAIN:-${BASE_DOMAIN}}"
KUBECONFIG_PATH="${KUBECONFIG_PATH:-/etc/rancher/k3s/k3s.yaml}"
DEPLOY_INGRESS="${DEPLOY_INGRESS:-true}"
WEBHOOK_REPLICAS="${WEBHOOK_REPLICAS:-1}"

View File

@@ -14,8 +14,8 @@ NC='\033[0m' # No Color
# Test configuration
ENVIRONMENTS=("dev" "staging" "prod")
DOMAINS=("2048-dev.wa.darknex.us" "2048-staging.wa.darknex.us" "2048.wa.darknex.us")
CANONICAL_DOMAINS=("game-2048-dev.game-2048-dev.dev.wa.darknex.us" "game-2048-staging.game-2048-staging.staging.wa.darknex.us" "game-2048-prod.game-2048-prod.wa.darknex.us")
DOMAINS=("${DEV_DOMAIN}" "${STAGING_DOMAIN}" "${PROD_DOMAIN}")
CANONICAL_DOMAINS=("${DEV_CANONICAL_DOMAIN}" "${STAGING_CANONICAL_DOMAIN}" "${PROD_CANONICAL_DOMAIN}")
TIMEOUT=30
echo -e "${BLUE}🧪 Starting 2048 Game Smoke Tests${NC}"