Reorganize to dedicated namespaces with automatic cleanup
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled

**Namespace Structure:**
- neonvortex: Application deployment and webhook listener
- flux-builds: Build jobs with automatic cleanup
- flux-system: Flux CD control plane (unchanged)

**Automatic Cleanup:**
- Build jobs: 30-minute TTL after completion
- Cleanup CronJob: Runs every 30 minutes
  - Keeps last 10 successful builds
  - Deletes failed jobs older than 1 hour
  - Removes all jobs older than 24 hours

**Changes:**
- Moved HelmRelease from default to neonvortex namespace
- Moved build jobs from default to flux-builds namespace
- Updated webhook listener to create jobs in flux-builds
- Updated Flux alerts to monitor new namespace
- Cleaned up all resources from default namespace
- Added dedicated ServiceAccounts and RBAC per namespace

**Benefits:**
- Clean namespace separation for better organization
- Automatic job cleanup prevents resource accumulation
- Build history maintained (last 10 successful builds)
- Improved monitoring and troubleshooting
- Default namespace is now clean

Comprehensive migration guide in NAMESPACE_MIGRATION_GUIDE.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Neon Vortex
2025-11-22 23:27:32 -05:00
parent 066d6cae67
commit d7bc188ee5
6 changed files with 627 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: neon-vortex-git
namespace: flux-system
spec:
summary: "Neon Vortex Git Updates"
providerRef:
name: neon-vortex-notify
eventSeverity: info
eventSources:
- kind: GitRepository
name: neon-vortex
namespace: flux-system
exclusionList:
- ".*health check.*"
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: neon-vortex-deploy
namespace: flux-system
spec:
summary: "Neon Vortex Deployment Status"
providerRef:
name: neon-vortex-notify
eventSeverity: info
eventSources:
- kind: HelmRelease
name: neon-vortex
namespace: neonvortex
exclusionList:
- ".*health check.*"
- ".*reconciliation in progress.*"