A Project Capsule addon

Kubernetes access.
With clear approvals.

Give teams a supported way to request platform resources.
Define templates, review requests, and manage their lifecycle.

What is Resource Permits?

Resource Permits helps platform teams offer services without handling every request manually or handing out broad administrator access. Teams request a predefined service, reviewers decide whether to approve it, and Kubernetes tracks the resources and their lifecycle. Requests can be made through the Kubernetes API, the kubectl plugin, or Headlamp.

Part of Project Capsule

Resource Permits is developed under the Project Capsule umbrella. Capsule is a CNCF Sandbox project. Resource Permits works with Capsule or independently on Kubernetes. It reuses Capsule’s shared libraries without requiring its controller or configuration. Platforms using Capsule can combine permits with their existing tenant policies.

From template to approved resource

Explore a template and the permit that uses it. Select a YAML block for an explanation.
On mobile, tap a block to open its guide.

1. Define what teams can request

A platform operator defines a temporary ConfigMap, its inputs, reviewer group, and cleanup policy.

ResourcePermitTemplate
Download YAML
apiVersion: v1
kind: ServiceAccount
metadata:
  name: permit-config-writer
  namespace: solar-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: permit-config-writer
  namespace: solar-system
rules:
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: permit-config-writer
  namespace: solar-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: permit-config-writer
subjects:
  - kind: ServiceAccount
    name: permit-config-writer
    namespace: solar-system
---
apiVersion: addons.projectcapsule.dev/v1beta2
kind: ResourcePermitTemplate
metadata:
  name: temporary-config
  namespace: solar-system
spec:
  defaultDuration: 30m
  maxDuration: 2h
  keepFor: 7d
  impersonation:
    name: permit-config-writer
  approvals:
    auto: false
    approvers:
      - kind: Group
        name: platform-on-call
  paramSchema:
    type: object
    additionalProperties: false
    required: [message]
    properties:
      message:
        type: string
        minLength: 1
        maxLength: 200
  resources:
    - policy:
        creation: Owner
        protect: true
        force: false
        deletion: Remove
      targets:
        - apiVersion: v1
          kind: ConfigMap
          metadata:
            name: '{{ .request.name }}'
          data:
            message: '{{ .message }}'
            requestedBy: '{{ .request.username }}'

2. Request an instance of the template

A team member selects that template in the same namespace and requests a 20-minute instance. After approval, the controller creates the ConfigMap and manages its expiry.

ResourcePermit
Download YAML
apiVersion: addons.projectcapsule.dev/v1beta2
kind: ResourcePermit
metadata:
  name: investigate-checkout
  namespace: solar-system
spec:
  template:
    kind: ResourcePermitTemplate
    name: temporary-config
  params:
    message: Checkout investigation in progress
  reason: Investigate checkout failures for INC-1042
  duration: 20m

Explore the example walkthroughs →