admission-control

Implement admission validation and mutation handlers for grafana-app-sdk Kubernetes resources.

213|18|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/grafana/skills --skill admission-control
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: admission-control
Source: https://github.com/grafana/skills/tree/main/skills/grafana-app-sdk/admission-control
Command: npx skills add https://github.com/grafana/skills --skill admission-control

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Admission control intercepts Kubernetes resource create/update/delete requests for grafana-app-sdk apps to ensure invalid or malformed objects are rejected and necessary modifications are applied before persistence.

Core Features & Use Cases

  • Validation Handlers: Implement Validator interfaces to accept or reject requests with clear, actionable error messages.
  • Mutating Handlers: Implement Mutator interfaces to set defaults, normalize fields, or modify objects before they are saved.
  • Use Case: Enforce immutability of critical fields, validate cross-field constraints, check referential integrity against other resources, and automatically populate defaults during resource creation.

Quick Start

Implement a Validator and/or Mutator for your resource type and register them in pkg/app/app.go so admission requests are handled before persistence.

Frequently Asked Questions about admission-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Kubernetes resources before they are persisted in a grafana-app-sdk application?▼

You can validate Kubernetes resources before persistence by implementing Validator interfaces to intercept admission requests and accept or reject create, update, delete, and connect flows for custom resource kinds.

Can I mutate or set defaults on Kubernetes objects during admission control?▼

Yes, admission control supports mutating handlers through Mutator interfaces that allow you to set defaults, normalize fields, or modify objects before they are saved to the Kubernetes cluster.

How do I enforce immutability and check referential integrity for custom resources in Kubernetes?▼

Admission validation handlers enforce immutability of critical fields, validate cross-field constraints, and perform client-based referential checks against other resources to reject invalid custom resource updates.

Do I need to configure CUE to register admission webhooks for grafana-app-sdk apps?▼

Yes, admission control requires CUE configuration to define validation and mutation rules, and you must register the Validator or Mutator implementations in pkg/app/app.go to handle requests.

Does admission control work with standalone operators and grafana/apps deployments?▼

Yes, admission control applies to grafana-app-sdk apps running as standalone operators or inside grafana/apps, intercepting Kubernetes resource requests across both deployment contexts before persistence.

What is the best way to test Kubernetes admission validation and mutation handlers?▼

The skill provides guidance for testing admission handlers by accessing AdmissionRequest fields and using structured error handling to verify validation and mutation logic before registering them in your app.