Skip to content

Releases: StatCan/namespace-cleaner

v0.1.0

11 Apr 14:15
04ab2d2
Compare
Choose a tag to compare

🚀 Initial Release – namespace-cleaner v0.1.0

This is the first release of namespace-cleaner, a Kubernetes utility designed to help manage and clean up stale or invalid namespaces in clusters running Kubeflow.

✨ Features

  • 🔍 Graph API Integration
    Uses Microsoft Graph with client credentials flow to verify whether namespace owners are valid Azure AD users.

  • 📅 Grace Period Support
    Invalid namespaces are labeled with a deletion date based on a configurable grace period.

  • 🧪 Dry-Run Mode
    Preview actions before making any changes to the cluster.

  • 🧼 Automatic Cleanup
    Deletes namespaces past their grace period if the owner is still invalid.

  • 🧪 Test Mode
    Simulate Azure users using test email lists for development or testing.

🛠️ Configuration

All runtime configuration is done through environment variables:

  • CLIENT_ID, CLIENT_SECRET, TENANT_ID – Microsoft Graph credentials
  • ALLOWED_DOMAINS – Comma-separated list of accepted email domains
  • TEST_USERS – (Optional) Emails to simulate in test mode
  • GRACE_PERIOD – Number of days before deletion
  • DRY_RUN, TEST_MODE – Flags to control behavior

🧩 Deployment

Run the compiled binary as a CronJob in your Kubernetes cluster, or invoke it manually as needed.