Overview
TheOrganization custom resource represents a top-level container for projects and resources. Organizations provide isolation, quota management, and access control boundaries.
Organization resources are part of the Milo resource manager API group (
resourcemanager.miloapis.com/v1alpha1).Resource Definition
API Group
resourcemanager.miloapis.com/v1alpha1OrganizationOrganization Types
Organizations can be one of two types:Personal
Automatically created for each user. Cannot be deleted or modified. Used for individual user workspaces.
Standard
Created by users for teams and companies. Can have multiple members with different roles.
Metadata
The name of the organization. Must be globally unique.Personal organizations: Named
personal-org-<hash> (automatically generated)Standard organizations: User-chosen nameAnnotations for organization metadata.Standard annotations:
kubernetes.io/display-name: Display name for UIskubernetes.io/description: Organization description
Owner references (used for personal organizations).Personal organizations have a controller reference to the User resource, ensuring the organization is deleted when the user is deleted.
Spec Fields
The type of organization.Values:
Personal: Personal organization (one per user)Standard: Team/company organization
Status Fields
The Organization status reflects the current state:The current phase of the organization.Values:
Active: Organization is active and readyPending: Organization is being set upDeleting: Organization is being deleted
The namespace created for this organization:
organization-<name>All organization-scoped resources are created in this namespace.Detailed conditions about the organization state.Each condition includes:
type: Condition type (e.g., “Ready”)status: True, False, or Unknownreason: Machine-readable reason codemessage: Human-readable messagelastTransitionTime: When the condition last changed
Quota Management
Organizations act as quota consumers. Quotas are granted to organizations and claimed by projects within the organization.Project Quota
Organizations have a quota for the number of projects they can create:- Personal organizations: Limited project quota
- Standard organizations: Higher default quota, can be increased
Organization Membership
Users are granted access to organizations viaOrganizationMembership resources:
Standard Roles
Full control over the organization and all its resources.Permissions:
- Create/delete projects
- Manage organization members
- View/edit all resources
- Manage quotas
Can create and manage resources but cannot manage organization settings.Permissions:
- Create/edit resources
- View organization details
- Cannot manage members or quotas
Read-only access to organization resources.Permissions:
- View all resources
- Cannot create/edit/delete
Validation Policies
Personal Organization Protection
Personal organizations have special validation rules:metadata.annotations['kubernetes.io/display-name']spec.type
Examples
Standard Organization
Personal Organization (Auto-created)
Organization with Membership
Create an organization and add a member:kubectl Commands
List Organizations
Get Organization Details
Create Standard Organization
View Organization Members
Delete Organization
Related Resources
- Project - Projects are created within organizations
- PersonalOrganizationController - Manages personal organization lifecycle
Troubleshooting
Cannot create organization
Cannot create organization
Check:
- Verify you have permission to create organizations
- Check if the name is already taken:
kubectl get organization <name> - Ensure the name follows Kubernetes naming conventions (lowercase, alphanumeric, hyphens)
- Check quota limits
Personal organization missing
Personal organization missing
Check:
- Verify the PersonalOrganizationController is running
- Check user status:
kubectl get user <name> -o yaml - View controller logs:
kubectl logs -n datum-system deployment/datum-controller-manager - Ensure user registration is approved
Cannot modify personal organization
Cannot modify personal organization
Personal organizations have restrictions:
- Display name cannot be changed
- Type cannot be changed
- Organization cannot be deleted (deleted with user)
Member cannot access organization resources
Member cannot access organization resources
Check:
- Verify membership exists:
kubectl get organizationmemberships -n organization-<name> - Check assigned roles in the membership spec
- Verify the role exists:
kubectl get role <role-name> -n <role-namespace> - Check PolicyBindings:
kubectl get policybindings -n organization-<name>
Source Reference
Source:internal/controller/resourcemanager/personal_organization_controller.go:80-100