Overview
The Resource Manager controllers are responsible for managing resource lifecycle and ensuring proper resource hierarchy in Datum Cloud. These controllers work with the Milo resource management API groups.Available Controllers
PersonalOrganizationController
The primary resource management controller that provisions personal organizations and projects for users. See: PersonalOrganizationController for detailed documentation. Managed Resources:- Organizations (type: Personal)
- OrganizationMemberships
- Projects (personal projects)
- Automatic provisioning of user workspaces
- Role assignment for organization owners
- User impersonation for proper RBAC validation
Controller Architecture
Resource Manager controllers are built using the controller-runtime framework and follow Kubernetes controller patterns:Reconciliation Loop
Manager Setup
Controllers are registered with the controller manager:API Groups
Resource Manager controllers work with these Milo API groups:Version: v1alpha1Core resource management types:
- Organization
- OrganizationMembership
- Project
Version: v1alpha1Identity and access management types:
- User
- Role
- PolicyBinding
Configuration
Resource Manager controllers are configured through theDatumControllerManager configuration resource:
Configuration Fields
Configuration for the PersonalOrganizationController.
Resource Quotas
Resource Manager controllers work with the quota system to enforce resource limits:Project Quota
- Personal organizations have default project quotas
- Standard organizations can be granted additional quota
- Projects claim quota from their parent organization
Validation Policies
Resource Manager controllers respect validation policies:Organization Updates
Project Name Validation
Monitoring
Controller Metrics
Resource Manager controllers expose standard controller-runtime metrics:controller_runtime_reconcile_total- Total reconciliation countcontroller_runtime_reconcile_errors_total- Failed reconciliation countcontroller_runtime_reconcile_time_seconds- Reconciliation duration
Health Checks
The controller manager provides health endpoints:Troubleshooting
Common Issues
Organization not created for new user
Organization not created for new user
Check:
- Verify the user resource exists:
kubectl get users - Check controller logs for errors:
kubectl logs -n datum-system deployment/datum-controller-manager - Ensure the controller has proper RBAC permissions
- Verify the user is not being deleted (has no deletionTimestamp)
Personal project not created
Personal project not created
Check:
- Verify user registration approval:
kubectl get user <name> -o jsonpath='{.status.registrationApproval}' - User must have approval state
Approved - Check for impersonation errors in controller logs
- Verify the parent organization exists and is ready
Role assignment failed
Role assignment failed
Check:
- Verify the configured role exists:
kubectl get role datum-cloud-owner -n datum-assignable-organization-roles - Check the controller configuration has correct roleName and roleNamespace
- Ensure the organization namespace was created
Source Reference
Source:internal/controller/resourcemanager/