+ # Container Mom + + > Containers like mom used to make + + Container Mom is a Kubernetes operator that makes deploying and managing applications as easy as sharing your Git repository. It handles everything from source-to-image builds to certificate management, just like mom always took care of everything for you. + + ## Features + + - **One-Click Deployments**: Share your Git repo, and mom handles the rest + - **Multi-Cluster Support**: Deploy across multiple clusters + - **Automatic TLS**: Built-in certificate management with Let's Encrypt + - **Custom Domains**: Use your domain or get a free *.container.mom subdomain + - **Resource Management**: Smart resource allocation and quota enforcement + - **Built-in Monitoring**: Health checks and automatic recovery + - **Billing Integration**: Usage-based billing with different service tiers + + ## Getting Started + + ### Prerequisites + + - Kubernetes 1.21+ + - cert-manager v1.13+ + - Nginx Ingress Controller + + ### Installation + + 1. Install cert-manager: + ```bash + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml + ``` + + 2. Deploy Container Mom: + ```bash + kubectl apply -k config/manager + ``` + + ## Usage + + ### Basic Deployment + + Create a deployment: + + ```yaml + apiVersion: containermom.io/v1alpha1 + kind: ContainerMomDeployment + metadata: + name: my-app + spec: + source: + gitUrl: "https://github.com/user/repo" + buildConfig: + builderImage: "nodejs-16" + clusters: + - us-east-1 + domain: + useWildcard: true + resources: + cpu: "1" + memory: "1Gi" + ``` + + ### Customer Configuration + + Set up a customer account: + + ```yaml + apiVersion: containermom.io/v1alpha1 + kind: Customer + metadata: + name: customer-123 + spec: + email: "user@example.com" + billingTier: "pro" + ``` + + ## Configuration + + ### Billing Tiers + + | Tier | Deployments | CPU | Memory | Clusters | + |------------|-------------|------|---------|----------| + | Basic | 3 | 2 | 2Gi | 1 | + | Pro | 10 | 8 | 8Gi | 3 | + | Enterprise | 50 | 32 | 64Gi | 10 | + + ### Domain Options + + - **Wildcard Domain**: Automatic subdomain under container.mom + - **Custom Domains**: Bring your own domain with TLS + - **DNS Providers**: Support for Cloudflare, Route53 + + ## Development + + ### Project Structure + + ``` + . + ├── cmd/ + │ └── mom/ # Main application + ├── pkg/ + │ ├── apis/ # API definitions + │ ├── config/ # Configuration + │ ├── controller/ # Controllers + │ ├── domain/ # Domain management + │ ├── operator/ # Core operator + │ └── web/ # Web interface + └── config/ # Kubernetes resources + ├── crds/ + ├── manager/ + └── rbac/ + ``` + + ### Building + + ```bash + # Build the operator + go build -o bin/container-mom cmd/mom/main.go + + # Run locally + ./bin/container-mom --config config/manager/config.yaml + ``` + + ### Testing + + ```bash + go test ./... + ``` + + ## Status + + - [x] Core operator framework + - [x] CRD definitions + - [x] Multi-cluster support + - [x] Domain management + - [x] TLS automation + - [ ] Source-to-image pipeline + - [ ] Billing integration + - [ ] Web portal + - [ ] Monitoring dashboard + + ## Contributing + + 1. Fork the repository + 2. Create your feature branch (`git checkout -b feature/amazing-feature`) + 3. Commit your changes (`git commit -m 'Add some amazing feature'`) + 4. Push to the branch (`git push origin feature/amazing-feature`) + 5. Open a Pull Request + + ## License + + This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.