[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-grafana-admission-control":3,"mdc-y21ag1-key":33,"related-repo-grafana-admission-control":1492,"related-org-grafana-admission-control":1601},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":31,"mdContent":32},"admission-control","implement admission control webhooks","Use when the user asks to \"write a validator\", \"add validation\", \"implement admission control\", \"write a mutating webhook\", \"add a mutation handler\", \"validate incoming resources\", \"implement admission logic\", \"add admission webhooks\", \"write ingress validation\", or asks how to validate or mutate resources before they are persisted in a grafana-app-sdk app. Provides guidance on implementing validation and mutation admission handlers for grafana-app-sdk apps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"grafana","Grafana","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fgrafana.jpg",[12,16,19],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":17,"slug":18,"type":15},"Validation","validation",{"name":20,"slug":21,"type":15},"Architecture","architecture",189,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fskills","2026-07-12T07:45:06.148973","Apache-2.0",16,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":30},[],null,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fgrafana-app-sdk\u002Fadmission-control","---\nname: admission-control\nlicense: Apache-2.0\ndescription: Use when the user asks to \"write a validator\", \"add validation\", \"implement admission control\", \"write a mutating webhook\", \"add a mutation handler\", \"validate incoming resources\", \"implement admission logic\", \"add admission webhooks\", \"write ingress validation\", or asks how to validate or mutate resources before they are persisted in a grafana-app-sdk app. Provides guidance on implementing validation and mutation admission handlers for grafana-app-sdk apps.\n---\n\n# Admission Control\n\nAdmission control intercepts resource create\u002Fupdate requests before they are persisted. In grafana-app-sdk there are two types:\n\n- **Validation** — accept or reject a request; cannot modify the resource\n- **Mutation** — modify the resource before it is persisted (e.g. set defaults, normalize fields)\n\nThe app business logic for admission is identical whether the app runs as a standalone operator or inside `grafana\u002Fapps`. The only difference is the runtime: standalone apps stand up their own webhook server; `grafana\u002Fapps` apps have admission auto-registered as a Kubernetes plugin.\n\n## Getting Stubs\n\nFor standalone apps, if `pkg\u002Fapp\u002Fapp.go` does not yet exist, a stub App can be generated with:\n\n```bash\ngrafana-app-sdk project component add operator\n```\n\nThis creates scaffolded `simple.App` which admission handlers can be added to for each kind in `ManagedKinds`.\n\n## Validator Interface\n\n```go\n\u002F\u002F Implement this interface for each kind you want to validate\ntype Validator interface {\n    Validate(ctx context.Context, request *app.AdmissionRequest) error\n}\n```\n\n- Return `nil` to admit the request\n- Return an error to reject it (the error message is returned to the API caller)\n- `app.AdmissionRequest` provides access to the incoming object and operation type\n- You can use `k8s.NewAdmissionError(err error, statusCode int, reason string)` (from `\"github.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Fk8s\"`) to better control the returned error information\n\n### Validator Example\n\n```go\ntype MyKindValidator struct{}\n\nfunc (v *MyKindValidator) Validate(ctx context.Context, req *app.AdmissionRequest) error {\n    obj, ok := req.Object.(*v1.MyKind)\n    if !ok {\n        return fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n    }\n\n    \u002F\u002F Validate spec fields\n    if obj.Spec.Title == \"\" {\n        return fmt.Errorf(\"spec.title is required\")\n    }\n\n    if obj.Spec.Count \u003C 0 {\n        return fmt.Errorf(\"spec.count must be non-negative, got %d\", obj.Spec.Count)\n    }\n\n    \u002F\u002F Distinguish create vs update\n    if req.Action == resource.AdmissionActionUpdate && req.OldObject != nil {\n        old, ok := req.OldObject.(*v1.MyKind)\n        if !ok {\n            return fmt.Errorf(\"admission request old object was of invalid type %T (expected *v1.MyKind)\", req.OldObject)\n        }\n        if old.Spec.Title != obj.Spec.Title {\n            return fmt.Errorf(\"spec.title is immutable after creation\")\n        }\n    }\n\n    return nil\n}\n```\n\n## Mutating Admission (Mutator)\n\n```go\n\u002F\u002F Implement this interface to mutate resources before persistence\ntype Mutator interface {\n    Mutate(ctx context.Context, request *app.AdmissionRequest) (*app.MutatingResponse, error)\n}\n```\n\n- Return a `MutatingResponse` containing the (optionally modified) object\n- Return an error to reject the request entirely\n- Best practice is to reject requests from validators, not mutators\n\n### Mutating Handler Example\n\n```go\ntype MyKindMutator struct{}\n\nfunc (m *MyKindMutator) Mutate(\n    ctx context.Context,\n    req *app.AdmissionRequest,\n) (*app.MutatingResponse, error) {\n    obj, ok := req.Object.(*v1.MyKind)\n    if !ok {\n        return nil, fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n    }\n\n    \u002F\u002F Set defaults on create\n    if req.Action == resource.AdmissionActionCreate {\n        if obj.Spec.Description == \"\" {\n            obj.Spec.Description = \"No description provided\"\n        }\n    }\n\n    return &app.MutatingResponse{UpdatedObject: obj}, nil\n}\n```\n\n## Registering Admission Handlers\n\nRegister validators and mutators when building the app in `pkg\u002Fapp\u002Fapp.go`:\n\n```go\nfunc New(cfg app.Config) (app.App, error) {\n    cfg.KubeConfig.APIPath = \"\u002Fapis\"\n    a, err := simple.NewApp(simple.AppConfig{\n        ManagedKinds: []simple.AppManagedKind{\n            {\n                Kind:      v1.MyKindKind(),\n                Validator: &MyKindValidator{},\n                Mutator:   &MyKindMutator{},\n            },\n        },\n    })\n    if err != nil {\n      return nil, fmt.Errorf(\"error creating app: %w\", err)\n    }\n    if err = a.ValidateManifest(cfg.ManifestData); err != nil {\n        return nil, fmt.Errorf(\"app manifest validation failed: %w\", err)\n    }\n    return a, nil\n}\n```\n\nNote that mutation and validation must also be enabled in the kind's CUE definition (`mutation.operations` and `validation.operations` fields) — see the `cue-kind-definition` skill for details.\n\n## Admission Request Fields\n\nKey fields available on `app.AdmissionRequest`:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `Object` | `resource.Object` | The incoming resource (after decoding) |\n| `OldObject` | `resource.Object` | Previous state (only on UPDATE operations) |\n| `Action` | `resource.AdmissionAction` | `AdmissionActionCreate`, `AdmissionActionUpdate`, `AdmissionActionDelete`, `AdmissionActionConnect` |\n| `UserInfo` | `resource.AdmissionUserInfo` | The user making the request |\n| `Kind` | `string` | The `Object` kind |\n| `Group` | `string` | The `Object` API Group |\n| `Version` | `string` | The `Object` API Version |\n\n## Validation Patterns\n\nCommon patterns to implement:\n\n```go\n\u002F\u002F Immutability check\nif req.Action == resource.AdmissionActionUpdate && old.Spec.ImmutableField != obj.Spec.ImmutableField {\n    return fmt.Errorf(\"spec.immutableField cannot be changed after creation\")\n}\n\n\u002F\u002F Cross-field validation\nif obj.Spec.StartTime.After(obj.Spec.EndTime) {\n    return fmt.Errorf(\"spec.startTime must be before spec.endTime\")\n}\n\n\u002F\u002F Referential validation (e.g. check referenced resource exists)\nif _, err := v.client.Get(ctx, resource.Identifier{Name: obj.Spec.RefName, Namespace: obj.Namespace}); err != nil {\n    return fmt.Errorf(\"referenced resource %q not found\", obj.Spec.RefName)\n}\n```\n\n## Deployment Difference\n\n| Mode | Admission runtime |\n|------|------------------|\n| Standalone operator | App starts a webhook server; Kubernetes routes admission requests to it |\n| `grafana\u002Fapps` | Admission handlers are auto-registered as a Kubernetes in-process plugin — no separate server required |\n\nThe handler code itself is identical in both cases.\n\n## Resources\n\n- [grafana-app-sdk GitHub](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk)\n- [app package docs](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Fapp)\n",{"data":34,"body":35},{"name":4,"license":25,"description":6},{"type":36,"children":37},"root",[38,46,52,77,98,105,118,162,183,189,233,286,293,557,563,601,627,633,791,797,809,965,994,1000,1011,1268,1274,1279,1393,1399,1450,1455,1461,1486],{"type":39,"tag":40,"props":41,"children":42},"element","h1",{"id":4},[43],{"type":44,"value":45},"text","Admission Control",{"type":39,"tag":47,"props":48,"children":49},"p",{},[50],{"type":44,"value":51},"Admission control intercepts resource create\u002Fupdate requests before they are persisted. In grafana-app-sdk there are two types:",{"type":39,"tag":53,"props":54,"children":55},"ul",{},[56,67],{"type":39,"tag":57,"props":58,"children":59},"li",{},[60,65],{"type":39,"tag":61,"props":62,"children":63},"strong",{},[64],{"type":44,"value":17},{"type":44,"value":66}," — accept or reject a request; cannot modify the resource",{"type":39,"tag":57,"props":68,"children":69},{},[70,75],{"type":39,"tag":61,"props":71,"children":72},{},[73],{"type":44,"value":74},"Mutation",{"type":44,"value":76}," — modify the resource before it is persisted (e.g. set defaults, normalize fields)",{"type":39,"tag":47,"props":78,"children":79},{},[80,82,89,91,96],{"type":44,"value":81},"The app business logic for admission is identical whether the app runs as a standalone operator or inside ",{"type":39,"tag":83,"props":84,"children":86},"code",{"className":85},[],[87],{"type":44,"value":88},"grafana\u002Fapps",{"type":44,"value":90},". The only difference is the runtime: standalone apps stand up their own webhook server; ",{"type":39,"tag":83,"props":92,"children":94},{"className":93},[],[95],{"type":44,"value":88},{"type":44,"value":97}," apps have admission auto-registered as a Kubernetes plugin.",{"type":39,"tag":99,"props":100,"children":102},"h2",{"id":101},"getting-stubs",[103],{"type":44,"value":104},"Getting Stubs",{"type":39,"tag":47,"props":106,"children":107},{},[108,110,116],{"type":44,"value":109},"For standalone apps, if ",{"type":39,"tag":83,"props":111,"children":113},{"className":112},[],[114],{"type":44,"value":115},"pkg\u002Fapp\u002Fapp.go",{"type":44,"value":117}," does not yet exist, a stub App can be generated with:",{"type":39,"tag":119,"props":120,"children":125},"pre",{"className":121,"code":122,"language":123,"meta":124,"style":124},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","grafana-app-sdk project component add operator\n","bash","",[126],{"type":39,"tag":83,"props":127,"children":128},{"__ignoreMap":124},[129],{"type":39,"tag":130,"props":131,"children":134},"span",{"class":132,"line":133},"line",1,[135,141,147,152,157],{"type":39,"tag":130,"props":136,"children":138},{"style":137},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[139],{"type":44,"value":140},"grafana-app-sdk",{"type":39,"tag":130,"props":142,"children":144},{"style":143},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[145],{"type":44,"value":146}," project",{"type":39,"tag":130,"props":148,"children":149},{"style":143},[150],{"type":44,"value":151}," component",{"type":39,"tag":130,"props":153,"children":154},{"style":143},[155],{"type":44,"value":156}," add",{"type":39,"tag":130,"props":158,"children":159},{"style":143},[160],{"type":44,"value":161}," operator\n",{"type":39,"tag":47,"props":163,"children":164},{},[165,167,173,175,181],{"type":44,"value":166},"This creates scaffolded ",{"type":39,"tag":83,"props":168,"children":170},{"className":169},[],[171],{"type":44,"value":172},"simple.App",{"type":44,"value":174}," which admission handlers can be added to for each kind in ",{"type":39,"tag":83,"props":176,"children":178},{"className":177},[],[179],{"type":44,"value":180},"ManagedKinds",{"type":44,"value":182},".",{"type":39,"tag":99,"props":184,"children":186},{"id":185},"validator-interface",[187],{"type":44,"value":188},"Validator Interface",{"type":39,"tag":119,"props":190,"children":194},{"className":191,"code":192,"language":193,"meta":124,"style":124},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Implement this interface for each kind you want to validate\ntype Validator interface {\n    Validate(ctx context.Context, request *app.AdmissionRequest) error\n}\n","go",[195],{"type":39,"tag":83,"props":196,"children":197},{"__ignoreMap":124},[198,206,215,224],{"type":39,"tag":130,"props":199,"children":200},{"class":132,"line":133},[201],{"type":39,"tag":130,"props":202,"children":203},{},[204],{"type":44,"value":205},"\u002F\u002F Implement this interface for each kind you want to validate\n",{"type":39,"tag":130,"props":207,"children":209},{"class":132,"line":208},2,[210],{"type":39,"tag":130,"props":211,"children":212},{},[213],{"type":44,"value":214},"type Validator interface {\n",{"type":39,"tag":130,"props":216,"children":218},{"class":132,"line":217},3,[219],{"type":39,"tag":130,"props":220,"children":221},{},[222],{"type":44,"value":223},"    Validate(ctx context.Context, request *app.AdmissionRequest) error\n",{"type":39,"tag":130,"props":225,"children":227},{"class":132,"line":226},4,[228],{"type":39,"tag":130,"props":229,"children":230},{},[231],{"type":44,"value":232},"}\n",{"type":39,"tag":53,"props":234,"children":235},{},[236,249,254,265],{"type":39,"tag":57,"props":237,"children":238},{},[239,241,247],{"type":44,"value":240},"Return ",{"type":39,"tag":83,"props":242,"children":244},{"className":243},[],[245],{"type":44,"value":246},"nil",{"type":44,"value":248}," to admit the request",{"type":39,"tag":57,"props":250,"children":251},{},[252],{"type":44,"value":253},"Return an error to reject it (the error message is returned to the API caller)",{"type":39,"tag":57,"props":255,"children":256},{},[257,263],{"type":39,"tag":83,"props":258,"children":260},{"className":259},[],[261],{"type":44,"value":262},"app.AdmissionRequest",{"type":44,"value":264}," provides access to the incoming object and operation type",{"type":39,"tag":57,"props":266,"children":267},{},[268,270,276,278,284],{"type":44,"value":269},"You can use ",{"type":39,"tag":83,"props":271,"children":273},{"className":272},[],[274],{"type":44,"value":275},"k8s.NewAdmissionError(err error, statusCode int, reason string)",{"type":44,"value":277}," (from ",{"type":39,"tag":83,"props":279,"children":281},{"className":280},[],[282],{"type":44,"value":283},"\"github.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Fk8s\"",{"type":44,"value":285},") to better control the returned error information",{"type":39,"tag":287,"props":288,"children":290},"h3",{"id":289},"validator-example",[291],{"type":44,"value":292},"Validator Example",{"type":39,"tag":119,"props":294,"children":296},{"className":191,"code":295,"language":193,"meta":124,"style":124},"type MyKindValidator struct{}\n\nfunc (v *MyKindValidator) Validate(ctx context.Context, req *app.AdmissionRequest) error {\n    obj, ok := req.Object.(*v1.MyKind)\n    if !ok {\n        return fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n    }\n\n    \u002F\u002F Validate spec fields\n    if obj.Spec.Title == \"\" {\n        return fmt.Errorf(\"spec.title is required\")\n    }\n\n    if obj.Spec.Count \u003C 0 {\n        return fmt.Errorf(\"spec.count must be non-negative, got %d\", obj.Spec.Count)\n    }\n\n    \u002F\u002F Distinguish create vs update\n    if req.Action == resource.AdmissionActionUpdate && req.OldObject != nil {\n        old, ok := req.OldObject.(*v1.MyKind)\n        if !ok {\n            return fmt.Errorf(\"admission request old object was of invalid type %T (expected *v1.MyKind)\", req.OldObject)\n        }\n        if old.Spec.Title != obj.Spec.Title {\n            return fmt.Errorf(\"spec.title is immutable after creation\")\n        }\n    }\n\n    return nil\n}\n",[297],{"type":39,"tag":83,"props":298,"children":299},{"__ignoreMap":124},[300,308,317,325,333,342,351,360,368,377,386,395,403,411,420,429,436,444,453,462,471,480,489,498,507,516,524,532,540,549],{"type":39,"tag":130,"props":301,"children":302},{"class":132,"line":133},[303],{"type":39,"tag":130,"props":304,"children":305},{},[306],{"type":44,"value":307},"type MyKindValidator struct{}\n",{"type":39,"tag":130,"props":309,"children":310},{"class":132,"line":208},[311],{"type":39,"tag":130,"props":312,"children":314},{"emptyLinePlaceholder":313},true,[315],{"type":44,"value":316},"\n",{"type":39,"tag":130,"props":318,"children":319},{"class":132,"line":217},[320],{"type":39,"tag":130,"props":321,"children":322},{},[323],{"type":44,"value":324},"func (v *MyKindValidator) Validate(ctx context.Context, req *app.AdmissionRequest) error {\n",{"type":39,"tag":130,"props":326,"children":327},{"class":132,"line":226},[328],{"type":39,"tag":130,"props":329,"children":330},{},[331],{"type":44,"value":332},"    obj, ok := req.Object.(*v1.MyKind)\n",{"type":39,"tag":130,"props":334,"children":336},{"class":132,"line":335},5,[337],{"type":39,"tag":130,"props":338,"children":339},{},[340],{"type":44,"value":341},"    if !ok {\n",{"type":39,"tag":130,"props":343,"children":345},{"class":132,"line":344},6,[346],{"type":39,"tag":130,"props":347,"children":348},{},[349],{"type":44,"value":350},"        return fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n",{"type":39,"tag":130,"props":352,"children":354},{"class":132,"line":353},7,[355],{"type":39,"tag":130,"props":356,"children":357},{},[358],{"type":44,"value":359},"    }\n",{"type":39,"tag":130,"props":361,"children":363},{"class":132,"line":362},8,[364],{"type":39,"tag":130,"props":365,"children":366},{"emptyLinePlaceholder":313},[367],{"type":44,"value":316},{"type":39,"tag":130,"props":369,"children":371},{"class":132,"line":370},9,[372],{"type":39,"tag":130,"props":373,"children":374},{},[375],{"type":44,"value":376},"    \u002F\u002F Validate spec fields\n",{"type":39,"tag":130,"props":378,"children":380},{"class":132,"line":379},10,[381],{"type":39,"tag":130,"props":382,"children":383},{},[384],{"type":44,"value":385},"    if obj.Spec.Title == \"\" {\n",{"type":39,"tag":130,"props":387,"children":389},{"class":132,"line":388},11,[390],{"type":39,"tag":130,"props":391,"children":392},{},[393],{"type":44,"value":394},"        return fmt.Errorf(\"spec.title is required\")\n",{"type":39,"tag":130,"props":396,"children":398},{"class":132,"line":397},12,[399],{"type":39,"tag":130,"props":400,"children":401},{},[402],{"type":44,"value":359},{"type":39,"tag":130,"props":404,"children":406},{"class":132,"line":405},13,[407],{"type":39,"tag":130,"props":408,"children":409},{"emptyLinePlaceholder":313},[410],{"type":44,"value":316},{"type":39,"tag":130,"props":412,"children":414},{"class":132,"line":413},14,[415],{"type":39,"tag":130,"props":416,"children":417},{},[418],{"type":44,"value":419},"    if obj.Spec.Count \u003C 0 {\n",{"type":39,"tag":130,"props":421,"children":423},{"class":132,"line":422},15,[424],{"type":39,"tag":130,"props":425,"children":426},{},[427],{"type":44,"value":428},"        return fmt.Errorf(\"spec.count must be non-negative, got %d\", obj.Spec.Count)\n",{"type":39,"tag":130,"props":430,"children":431},{"class":132,"line":26},[432],{"type":39,"tag":130,"props":433,"children":434},{},[435],{"type":44,"value":359},{"type":39,"tag":130,"props":437,"children":439},{"class":132,"line":438},17,[440],{"type":39,"tag":130,"props":441,"children":442},{"emptyLinePlaceholder":313},[443],{"type":44,"value":316},{"type":39,"tag":130,"props":445,"children":447},{"class":132,"line":446},18,[448],{"type":39,"tag":130,"props":449,"children":450},{},[451],{"type":44,"value":452},"    \u002F\u002F Distinguish create vs update\n",{"type":39,"tag":130,"props":454,"children":456},{"class":132,"line":455},19,[457],{"type":39,"tag":130,"props":458,"children":459},{},[460],{"type":44,"value":461},"    if req.Action == resource.AdmissionActionUpdate && req.OldObject != nil {\n",{"type":39,"tag":130,"props":463,"children":465},{"class":132,"line":464},20,[466],{"type":39,"tag":130,"props":467,"children":468},{},[469],{"type":44,"value":470},"        old, ok := req.OldObject.(*v1.MyKind)\n",{"type":39,"tag":130,"props":472,"children":474},{"class":132,"line":473},21,[475],{"type":39,"tag":130,"props":476,"children":477},{},[478],{"type":44,"value":479},"        if !ok {\n",{"type":39,"tag":130,"props":481,"children":483},{"class":132,"line":482},22,[484],{"type":39,"tag":130,"props":485,"children":486},{},[487],{"type":44,"value":488},"            return fmt.Errorf(\"admission request old object was of invalid type %T (expected *v1.MyKind)\", req.OldObject)\n",{"type":39,"tag":130,"props":490,"children":492},{"class":132,"line":491},23,[493],{"type":39,"tag":130,"props":494,"children":495},{},[496],{"type":44,"value":497},"        }\n",{"type":39,"tag":130,"props":499,"children":501},{"class":132,"line":500},24,[502],{"type":39,"tag":130,"props":503,"children":504},{},[505],{"type":44,"value":506},"        if old.Spec.Title != obj.Spec.Title {\n",{"type":39,"tag":130,"props":508,"children":510},{"class":132,"line":509},25,[511],{"type":39,"tag":130,"props":512,"children":513},{},[514],{"type":44,"value":515},"            return fmt.Errorf(\"spec.title is immutable after creation\")\n",{"type":39,"tag":130,"props":517,"children":519},{"class":132,"line":518},26,[520],{"type":39,"tag":130,"props":521,"children":522},{},[523],{"type":44,"value":497},{"type":39,"tag":130,"props":525,"children":527},{"class":132,"line":526},27,[528],{"type":39,"tag":130,"props":529,"children":530},{},[531],{"type":44,"value":359},{"type":39,"tag":130,"props":533,"children":535},{"class":132,"line":534},28,[536],{"type":39,"tag":130,"props":537,"children":538},{"emptyLinePlaceholder":313},[539],{"type":44,"value":316},{"type":39,"tag":130,"props":541,"children":543},{"class":132,"line":542},29,[544],{"type":39,"tag":130,"props":545,"children":546},{},[547],{"type":44,"value":548},"    return nil\n",{"type":39,"tag":130,"props":550,"children":552},{"class":132,"line":551},30,[553],{"type":39,"tag":130,"props":554,"children":555},{},[556],{"type":44,"value":232},{"type":39,"tag":99,"props":558,"children":560},{"id":559},"mutating-admission-mutator",[561],{"type":44,"value":562},"Mutating Admission (Mutator)",{"type":39,"tag":119,"props":564,"children":566},{"className":191,"code":565,"language":193,"meta":124,"style":124},"\u002F\u002F Implement this interface to mutate resources before persistence\ntype Mutator interface {\n    Mutate(ctx context.Context, request *app.AdmissionRequest) (*app.MutatingResponse, error)\n}\n",[567],{"type":39,"tag":83,"props":568,"children":569},{"__ignoreMap":124},[570,578,586,594],{"type":39,"tag":130,"props":571,"children":572},{"class":132,"line":133},[573],{"type":39,"tag":130,"props":574,"children":575},{},[576],{"type":44,"value":577},"\u002F\u002F Implement this interface to mutate resources before persistence\n",{"type":39,"tag":130,"props":579,"children":580},{"class":132,"line":208},[581],{"type":39,"tag":130,"props":582,"children":583},{},[584],{"type":44,"value":585},"type Mutator interface {\n",{"type":39,"tag":130,"props":587,"children":588},{"class":132,"line":217},[589],{"type":39,"tag":130,"props":590,"children":591},{},[592],{"type":44,"value":593},"    Mutate(ctx context.Context, request *app.AdmissionRequest) (*app.MutatingResponse, error)\n",{"type":39,"tag":130,"props":595,"children":596},{"class":132,"line":226},[597],{"type":39,"tag":130,"props":598,"children":599},{},[600],{"type":44,"value":232},{"type":39,"tag":53,"props":602,"children":603},{},[604,617,622],{"type":39,"tag":57,"props":605,"children":606},{},[607,609,615],{"type":44,"value":608},"Return a ",{"type":39,"tag":83,"props":610,"children":612},{"className":611},[],[613],{"type":44,"value":614},"MutatingResponse",{"type":44,"value":616}," containing the (optionally modified) object",{"type":39,"tag":57,"props":618,"children":619},{},[620],{"type":44,"value":621},"Return an error to reject the request entirely",{"type":39,"tag":57,"props":623,"children":624},{},[625],{"type":44,"value":626},"Best practice is to reject requests from validators, not mutators",{"type":39,"tag":287,"props":628,"children":630},{"id":629},"mutating-handler-example",[631],{"type":44,"value":632},"Mutating Handler Example",{"type":39,"tag":119,"props":634,"children":636},{"className":191,"code":635,"language":193,"meta":124,"style":124},"type MyKindMutator struct{}\n\nfunc (m *MyKindMutator) Mutate(\n    ctx context.Context,\n    req *app.AdmissionRequest,\n) (*app.MutatingResponse, error) {\n    obj, ok := req.Object.(*v1.MyKind)\n    if !ok {\n        return nil, fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n    }\n\n    \u002F\u002F Set defaults on create\n    if req.Action == resource.AdmissionActionCreate {\n        if obj.Spec.Description == \"\" {\n            obj.Spec.Description = \"No description provided\"\n        }\n    }\n\n    return &app.MutatingResponse{UpdatedObject: obj}, nil\n}\n",[637],{"type":39,"tag":83,"props":638,"children":639},{"__ignoreMap":124},[640,648,655,663,671,679,687,694,701,709,716,723,731,739,747,755,762,769,776,784],{"type":39,"tag":130,"props":641,"children":642},{"class":132,"line":133},[643],{"type":39,"tag":130,"props":644,"children":645},{},[646],{"type":44,"value":647},"type MyKindMutator struct{}\n",{"type":39,"tag":130,"props":649,"children":650},{"class":132,"line":208},[651],{"type":39,"tag":130,"props":652,"children":653},{"emptyLinePlaceholder":313},[654],{"type":44,"value":316},{"type":39,"tag":130,"props":656,"children":657},{"class":132,"line":217},[658],{"type":39,"tag":130,"props":659,"children":660},{},[661],{"type":44,"value":662},"func (m *MyKindMutator) Mutate(\n",{"type":39,"tag":130,"props":664,"children":665},{"class":132,"line":226},[666],{"type":39,"tag":130,"props":667,"children":668},{},[669],{"type":44,"value":670},"    ctx context.Context,\n",{"type":39,"tag":130,"props":672,"children":673},{"class":132,"line":335},[674],{"type":39,"tag":130,"props":675,"children":676},{},[677],{"type":44,"value":678},"    req *app.AdmissionRequest,\n",{"type":39,"tag":130,"props":680,"children":681},{"class":132,"line":344},[682],{"type":39,"tag":130,"props":683,"children":684},{},[685],{"type":44,"value":686},") (*app.MutatingResponse, error) {\n",{"type":39,"tag":130,"props":688,"children":689},{"class":132,"line":353},[690],{"type":39,"tag":130,"props":691,"children":692},{},[693],{"type":44,"value":332},{"type":39,"tag":130,"props":695,"children":696},{"class":132,"line":362},[697],{"type":39,"tag":130,"props":698,"children":699},{},[700],{"type":44,"value":341},{"type":39,"tag":130,"props":702,"children":703},{"class":132,"line":370},[704],{"type":39,"tag":130,"props":705,"children":706},{},[707],{"type":44,"value":708},"        return nil, fmt.Errorf(\"admission request object was of invalid type %T (expected *v1.MyKind)\", req.Object)\n",{"type":39,"tag":130,"props":710,"children":711},{"class":132,"line":379},[712],{"type":39,"tag":130,"props":713,"children":714},{},[715],{"type":44,"value":359},{"type":39,"tag":130,"props":717,"children":718},{"class":132,"line":388},[719],{"type":39,"tag":130,"props":720,"children":721},{"emptyLinePlaceholder":313},[722],{"type":44,"value":316},{"type":39,"tag":130,"props":724,"children":725},{"class":132,"line":397},[726],{"type":39,"tag":130,"props":727,"children":728},{},[729],{"type":44,"value":730},"    \u002F\u002F Set defaults on create\n",{"type":39,"tag":130,"props":732,"children":733},{"class":132,"line":405},[734],{"type":39,"tag":130,"props":735,"children":736},{},[737],{"type":44,"value":738},"    if req.Action == resource.AdmissionActionCreate {\n",{"type":39,"tag":130,"props":740,"children":741},{"class":132,"line":413},[742],{"type":39,"tag":130,"props":743,"children":744},{},[745],{"type":44,"value":746},"        if obj.Spec.Description == \"\" {\n",{"type":39,"tag":130,"props":748,"children":749},{"class":132,"line":422},[750],{"type":39,"tag":130,"props":751,"children":752},{},[753],{"type":44,"value":754},"            obj.Spec.Description = \"No description provided\"\n",{"type":39,"tag":130,"props":756,"children":757},{"class":132,"line":26},[758],{"type":39,"tag":130,"props":759,"children":760},{},[761],{"type":44,"value":497},{"type":39,"tag":130,"props":763,"children":764},{"class":132,"line":438},[765],{"type":39,"tag":130,"props":766,"children":767},{},[768],{"type":44,"value":359},{"type":39,"tag":130,"props":770,"children":771},{"class":132,"line":446},[772],{"type":39,"tag":130,"props":773,"children":774},{"emptyLinePlaceholder":313},[775],{"type":44,"value":316},{"type":39,"tag":130,"props":777,"children":778},{"class":132,"line":455},[779],{"type":39,"tag":130,"props":780,"children":781},{},[782],{"type":44,"value":783},"    return &app.MutatingResponse{UpdatedObject: obj}, nil\n",{"type":39,"tag":130,"props":785,"children":786},{"class":132,"line":464},[787],{"type":39,"tag":130,"props":788,"children":789},{},[790],{"type":44,"value":232},{"type":39,"tag":99,"props":792,"children":794},{"id":793},"registering-admission-handlers",[795],{"type":44,"value":796},"Registering Admission Handlers",{"type":39,"tag":47,"props":798,"children":799},{},[800,802,807],{"type":44,"value":801},"Register validators and mutators when building the app in ",{"type":39,"tag":83,"props":803,"children":805},{"className":804},[],[806],{"type":44,"value":115},{"type":44,"value":808},":",{"type":39,"tag":119,"props":810,"children":812},{"className":191,"code":811,"language":193,"meta":124,"style":124},"func New(cfg app.Config) (app.App, error) {\n    cfg.KubeConfig.APIPath = \"\u002Fapis\"\n    a, err := simple.NewApp(simple.AppConfig{\n        ManagedKinds: []simple.AppManagedKind{\n            {\n                Kind:      v1.MyKindKind(),\n                Validator: &MyKindValidator{},\n                Mutator:   &MyKindMutator{},\n            },\n        },\n    })\n    if err != nil {\n      return nil, fmt.Errorf(\"error creating app: %w\", err)\n    }\n    if err = a.ValidateManifest(cfg.ManifestData); err != nil {\n        return nil, fmt.Errorf(\"app manifest validation failed: %w\", err)\n    }\n    return a, nil\n}\n",[813],{"type":39,"tag":83,"props":814,"children":815},{"__ignoreMap":124},[816,824,832,840,848,856,864,872,880,888,896,904,912,920,927,935,943,950,958],{"type":39,"tag":130,"props":817,"children":818},{"class":132,"line":133},[819],{"type":39,"tag":130,"props":820,"children":821},{},[822],{"type":44,"value":823},"func New(cfg app.Config) (app.App, error) {\n",{"type":39,"tag":130,"props":825,"children":826},{"class":132,"line":208},[827],{"type":39,"tag":130,"props":828,"children":829},{},[830],{"type":44,"value":831},"    cfg.KubeConfig.APIPath = \"\u002Fapis\"\n",{"type":39,"tag":130,"props":833,"children":834},{"class":132,"line":217},[835],{"type":39,"tag":130,"props":836,"children":837},{},[838],{"type":44,"value":839},"    a, err := simple.NewApp(simple.AppConfig{\n",{"type":39,"tag":130,"props":841,"children":842},{"class":132,"line":226},[843],{"type":39,"tag":130,"props":844,"children":845},{},[846],{"type":44,"value":847},"        ManagedKinds: []simple.AppManagedKind{\n",{"type":39,"tag":130,"props":849,"children":850},{"class":132,"line":335},[851],{"type":39,"tag":130,"props":852,"children":853},{},[854],{"type":44,"value":855},"            {\n",{"type":39,"tag":130,"props":857,"children":858},{"class":132,"line":344},[859],{"type":39,"tag":130,"props":860,"children":861},{},[862],{"type":44,"value":863},"                Kind:      v1.MyKindKind(),\n",{"type":39,"tag":130,"props":865,"children":866},{"class":132,"line":353},[867],{"type":39,"tag":130,"props":868,"children":869},{},[870],{"type":44,"value":871},"                Validator: &MyKindValidator{},\n",{"type":39,"tag":130,"props":873,"children":874},{"class":132,"line":362},[875],{"type":39,"tag":130,"props":876,"children":877},{},[878],{"type":44,"value":879},"                Mutator:   &MyKindMutator{},\n",{"type":39,"tag":130,"props":881,"children":882},{"class":132,"line":370},[883],{"type":39,"tag":130,"props":884,"children":885},{},[886],{"type":44,"value":887},"            },\n",{"type":39,"tag":130,"props":889,"children":890},{"class":132,"line":379},[891],{"type":39,"tag":130,"props":892,"children":893},{},[894],{"type":44,"value":895},"        },\n",{"type":39,"tag":130,"props":897,"children":898},{"class":132,"line":388},[899],{"type":39,"tag":130,"props":900,"children":901},{},[902],{"type":44,"value":903},"    })\n",{"type":39,"tag":130,"props":905,"children":906},{"class":132,"line":397},[907],{"type":39,"tag":130,"props":908,"children":909},{},[910],{"type":44,"value":911},"    if err != nil {\n",{"type":39,"tag":130,"props":913,"children":914},{"class":132,"line":405},[915],{"type":39,"tag":130,"props":916,"children":917},{},[918],{"type":44,"value":919},"      return nil, fmt.Errorf(\"error creating app: %w\", err)\n",{"type":39,"tag":130,"props":921,"children":922},{"class":132,"line":413},[923],{"type":39,"tag":130,"props":924,"children":925},{},[926],{"type":44,"value":359},{"type":39,"tag":130,"props":928,"children":929},{"class":132,"line":422},[930],{"type":39,"tag":130,"props":931,"children":932},{},[933],{"type":44,"value":934},"    if err = a.ValidateManifest(cfg.ManifestData); err != nil {\n",{"type":39,"tag":130,"props":936,"children":937},{"class":132,"line":26},[938],{"type":39,"tag":130,"props":939,"children":940},{},[941],{"type":44,"value":942},"        return nil, fmt.Errorf(\"app manifest validation failed: %w\", err)\n",{"type":39,"tag":130,"props":944,"children":945},{"class":132,"line":438},[946],{"type":39,"tag":130,"props":947,"children":948},{},[949],{"type":44,"value":359},{"type":39,"tag":130,"props":951,"children":952},{"class":132,"line":446},[953],{"type":39,"tag":130,"props":954,"children":955},{},[956],{"type":44,"value":957},"    return a, nil\n",{"type":39,"tag":130,"props":959,"children":960},{"class":132,"line":455},[961],{"type":39,"tag":130,"props":962,"children":963},{},[964],{"type":44,"value":232},{"type":39,"tag":47,"props":966,"children":967},{},[968,970,976,978,984,986,992],{"type":44,"value":969},"Note that mutation and validation must also be enabled in the kind's CUE definition (",{"type":39,"tag":83,"props":971,"children":973},{"className":972},[],[974],{"type":44,"value":975},"mutation.operations",{"type":44,"value":977}," and ",{"type":39,"tag":83,"props":979,"children":981},{"className":980},[],[982],{"type":44,"value":983},"validation.operations",{"type":44,"value":985}," fields) — see the ",{"type":39,"tag":83,"props":987,"children":989},{"className":988},[],[990],{"type":44,"value":991},"cue-kind-definition",{"type":44,"value":993}," skill for details.",{"type":39,"tag":99,"props":995,"children":997},{"id":996},"admission-request-fields",[998],{"type":44,"value":999},"Admission Request Fields",{"type":39,"tag":47,"props":1001,"children":1002},{},[1003,1005,1010],{"type":44,"value":1004},"Key fields available on ",{"type":39,"tag":83,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":44,"value":262},{"type":44,"value":808},{"type":39,"tag":1012,"props":1013,"children":1014},"table",{},[1015,1039],{"type":39,"tag":1016,"props":1017,"children":1018},"thead",{},[1019],{"type":39,"tag":1020,"props":1021,"children":1022},"tr",{},[1023,1029,1034],{"type":39,"tag":1024,"props":1025,"children":1026},"th",{},[1027],{"type":44,"value":1028},"Field",{"type":39,"tag":1024,"props":1030,"children":1031},{},[1032],{"type":44,"value":1033},"Type",{"type":39,"tag":1024,"props":1035,"children":1036},{},[1037],{"type":44,"value":1038},"Description",{"type":39,"tag":1040,"props":1041,"children":1042},"tbody",{},[1043,1070,1095,1147,1173,1206,1237],{"type":39,"tag":1020,"props":1044,"children":1045},{},[1046,1056,1065],{"type":39,"tag":1047,"props":1048,"children":1049},"td",{},[1050],{"type":39,"tag":83,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":44,"value":1055},"Object",{"type":39,"tag":1047,"props":1057,"children":1058},{},[1059],{"type":39,"tag":83,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":44,"value":1064},"resource.Object",{"type":39,"tag":1047,"props":1066,"children":1067},{},[1068],{"type":44,"value":1069},"The incoming resource (after decoding)",{"type":39,"tag":1020,"props":1071,"children":1072},{},[1073,1082,1090],{"type":39,"tag":1047,"props":1074,"children":1075},{},[1076],{"type":39,"tag":83,"props":1077,"children":1079},{"className":1078},[],[1080],{"type":44,"value":1081},"OldObject",{"type":39,"tag":1047,"props":1083,"children":1084},{},[1085],{"type":39,"tag":83,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":44,"value":1064},{"type":39,"tag":1047,"props":1091,"children":1092},{},[1093],{"type":44,"value":1094},"Previous state (only on UPDATE operations)",{"type":39,"tag":1020,"props":1096,"children":1097},{},[1098,1107,1116],{"type":39,"tag":1047,"props":1099,"children":1100},{},[1101],{"type":39,"tag":83,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":44,"value":1106},"Action",{"type":39,"tag":1047,"props":1108,"children":1109},{},[1110],{"type":39,"tag":83,"props":1111,"children":1113},{"className":1112},[],[1114],{"type":44,"value":1115},"resource.AdmissionAction",{"type":39,"tag":1047,"props":1117,"children":1118},{},[1119,1125,1127,1133,1134,1140,1141],{"type":39,"tag":83,"props":1120,"children":1122},{"className":1121},[],[1123],{"type":44,"value":1124},"AdmissionActionCreate",{"type":44,"value":1126},", ",{"type":39,"tag":83,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":44,"value":1132},"AdmissionActionUpdate",{"type":44,"value":1126},{"type":39,"tag":83,"props":1135,"children":1137},{"className":1136},[],[1138],{"type":44,"value":1139},"AdmissionActionDelete",{"type":44,"value":1126},{"type":39,"tag":83,"props":1142,"children":1144},{"className":1143},[],[1145],{"type":44,"value":1146},"AdmissionActionConnect",{"type":39,"tag":1020,"props":1148,"children":1149},{},[1150,1159,1168],{"type":39,"tag":1047,"props":1151,"children":1152},{},[1153],{"type":39,"tag":83,"props":1154,"children":1156},{"className":1155},[],[1157],{"type":44,"value":1158},"UserInfo",{"type":39,"tag":1047,"props":1160,"children":1161},{},[1162],{"type":39,"tag":83,"props":1163,"children":1165},{"className":1164},[],[1166],{"type":44,"value":1167},"resource.AdmissionUserInfo",{"type":39,"tag":1047,"props":1169,"children":1170},{},[1171],{"type":44,"value":1172},"The user making the request",{"type":39,"tag":1020,"props":1174,"children":1175},{},[1176,1185,1194],{"type":39,"tag":1047,"props":1177,"children":1178},{},[1179],{"type":39,"tag":83,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":44,"value":1184},"Kind",{"type":39,"tag":1047,"props":1186,"children":1187},{},[1188],{"type":39,"tag":83,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":44,"value":1193},"string",{"type":39,"tag":1047,"props":1195,"children":1196},{},[1197,1199,1204],{"type":44,"value":1198},"The ",{"type":39,"tag":83,"props":1200,"children":1202},{"className":1201},[],[1203],{"type":44,"value":1055},{"type":44,"value":1205}," kind",{"type":39,"tag":1020,"props":1207,"children":1208},{},[1209,1218,1226],{"type":39,"tag":1047,"props":1210,"children":1211},{},[1212],{"type":39,"tag":83,"props":1213,"children":1215},{"className":1214},[],[1216],{"type":44,"value":1217},"Group",{"type":39,"tag":1047,"props":1219,"children":1220},{},[1221],{"type":39,"tag":83,"props":1222,"children":1224},{"className":1223},[],[1225],{"type":44,"value":1193},{"type":39,"tag":1047,"props":1227,"children":1228},{},[1229,1230,1235],{"type":44,"value":1198},{"type":39,"tag":83,"props":1231,"children":1233},{"className":1232},[],[1234],{"type":44,"value":1055},{"type":44,"value":1236}," API Group",{"type":39,"tag":1020,"props":1238,"children":1239},{},[1240,1249,1257],{"type":39,"tag":1047,"props":1241,"children":1242},{},[1243],{"type":39,"tag":83,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":44,"value":1248},"Version",{"type":39,"tag":1047,"props":1250,"children":1251},{},[1252],{"type":39,"tag":83,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":44,"value":1193},{"type":39,"tag":1047,"props":1258,"children":1259},{},[1260,1261,1266],{"type":44,"value":1198},{"type":39,"tag":83,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":44,"value":1055},{"type":44,"value":1267}," API Version",{"type":39,"tag":99,"props":1269,"children":1271},{"id":1270},"validation-patterns",[1272],{"type":44,"value":1273},"Validation Patterns",{"type":39,"tag":47,"props":1275,"children":1276},{},[1277],{"type":44,"value":1278},"Common patterns to implement:",{"type":39,"tag":119,"props":1280,"children":1282},{"className":191,"code":1281,"language":193,"meta":124,"style":124},"\u002F\u002F Immutability check\nif req.Action == resource.AdmissionActionUpdate && old.Spec.ImmutableField != obj.Spec.ImmutableField {\n    return fmt.Errorf(\"spec.immutableField cannot be changed after creation\")\n}\n\n\u002F\u002F Cross-field validation\nif obj.Spec.StartTime.After(obj.Spec.EndTime) {\n    return fmt.Errorf(\"spec.startTime must be before spec.endTime\")\n}\n\n\u002F\u002F Referential validation (e.g. check referenced resource exists)\nif _, err := v.client.Get(ctx, resource.Identifier{Name: obj.Spec.RefName, Namespace: obj.Namespace}); err != nil {\n    return fmt.Errorf(\"referenced resource %q not found\", obj.Spec.RefName)\n}\n",[1283],{"type":39,"tag":83,"props":1284,"children":1285},{"__ignoreMap":124},[1286,1294,1302,1310,1317,1324,1332,1340,1348,1355,1362,1370,1378,1386],{"type":39,"tag":130,"props":1287,"children":1288},{"class":132,"line":133},[1289],{"type":39,"tag":130,"props":1290,"children":1291},{},[1292],{"type":44,"value":1293},"\u002F\u002F Immutability check\n",{"type":39,"tag":130,"props":1295,"children":1296},{"class":132,"line":208},[1297],{"type":39,"tag":130,"props":1298,"children":1299},{},[1300],{"type":44,"value":1301},"if req.Action == resource.AdmissionActionUpdate && old.Spec.ImmutableField != obj.Spec.ImmutableField {\n",{"type":39,"tag":130,"props":1303,"children":1304},{"class":132,"line":217},[1305],{"type":39,"tag":130,"props":1306,"children":1307},{},[1308],{"type":44,"value":1309},"    return fmt.Errorf(\"spec.immutableField cannot be changed after creation\")\n",{"type":39,"tag":130,"props":1311,"children":1312},{"class":132,"line":226},[1313],{"type":39,"tag":130,"props":1314,"children":1315},{},[1316],{"type":44,"value":232},{"type":39,"tag":130,"props":1318,"children":1319},{"class":132,"line":335},[1320],{"type":39,"tag":130,"props":1321,"children":1322},{"emptyLinePlaceholder":313},[1323],{"type":44,"value":316},{"type":39,"tag":130,"props":1325,"children":1326},{"class":132,"line":344},[1327],{"type":39,"tag":130,"props":1328,"children":1329},{},[1330],{"type":44,"value":1331},"\u002F\u002F Cross-field validation\n",{"type":39,"tag":130,"props":1333,"children":1334},{"class":132,"line":353},[1335],{"type":39,"tag":130,"props":1336,"children":1337},{},[1338],{"type":44,"value":1339},"if obj.Spec.StartTime.After(obj.Spec.EndTime) {\n",{"type":39,"tag":130,"props":1341,"children":1342},{"class":132,"line":362},[1343],{"type":39,"tag":130,"props":1344,"children":1345},{},[1346],{"type":44,"value":1347},"    return fmt.Errorf(\"spec.startTime must be before spec.endTime\")\n",{"type":39,"tag":130,"props":1349,"children":1350},{"class":132,"line":370},[1351],{"type":39,"tag":130,"props":1352,"children":1353},{},[1354],{"type":44,"value":232},{"type":39,"tag":130,"props":1356,"children":1357},{"class":132,"line":379},[1358],{"type":39,"tag":130,"props":1359,"children":1360},{"emptyLinePlaceholder":313},[1361],{"type":44,"value":316},{"type":39,"tag":130,"props":1363,"children":1364},{"class":132,"line":388},[1365],{"type":39,"tag":130,"props":1366,"children":1367},{},[1368],{"type":44,"value":1369},"\u002F\u002F Referential validation (e.g. check referenced resource exists)\n",{"type":39,"tag":130,"props":1371,"children":1372},{"class":132,"line":397},[1373],{"type":39,"tag":130,"props":1374,"children":1375},{},[1376],{"type":44,"value":1377},"if _, err := v.client.Get(ctx, resource.Identifier{Name: obj.Spec.RefName, Namespace: obj.Namespace}); err != nil {\n",{"type":39,"tag":130,"props":1379,"children":1380},{"class":132,"line":405},[1381],{"type":39,"tag":130,"props":1382,"children":1383},{},[1384],{"type":44,"value":1385},"    return fmt.Errorf(\"referenced resource %q not found\", obj.Spec.RefName)\n",{"type":39,"tag":130,"props":1387,"children":1388},{"class":132,"line":413},[1389],{"type":39,"tag":130,"props":1390,"children":1391},{},[1392],{"type":44,"value":232},{"type":39,"tag":99,"props":1394,"children":1396},{"id":1395},"deployment-difference",[1397],{"type":44,"value":1398},"Deployment Difference",{"type":39,"tag":1012,"props":1400,"children":1401},{},[1402,1418],{"type":39,"tag":1016,"props":1403,"children":1404},{},[1405],{"type":39,"tag":1020,"props":1406,"children":1407},{},[1408,1413],{"type":39,"tag":1024,"props":1409,"children":1410},{},[1411],{"type":44,"value":1412},"Mode",{"type":39,"tag":1024,"props":1414,"children":1415},{},[1416],{"type":44,"value":1417},"Admission runtime",{"type":39,"tag":1040,"props":1419,"children":1420},{},[1421,1434],{"type":39,"tag":1020,"props":1422,"children":1423},{},[1424,1429],{"type":39,"tag":1047,"props":1425,"children":1426},{},[1427],{"type":44,"value":1428},"Standalone operator",{"type":39,"tag":1047,"props":1430,"children":1431},{},[1432],{"type":44,"value":1433},"App starts a webhook server; Kubernetes routes admission requests to it",{"type":39,"tag":1020,"props":1435,"children":1436},{},[1437,1445],{"type":39,"tag":1047,"props":1438,"children":1439},{},[1440],{"type":39,"tag":83,"props":1441,"children":1443},{"className":1442},[],[1444],{"type":44,"value":88},{"type":39,"tag":1047,"props":1446,"children":1447},{},[1448],{"type":44,"value":1449},"Admission handlers are auto-registered as a Kubernetes in-process plugin — no separate server required",{"type":39,"tag":47,"props":1451,"children":1452},{},[1453],{"type":44,"value":1454},"The handler code itself is identical in both cases.",{"type":39,"tag":99,"props":1456,"children":1458},{"id":1457},"resources",[1459],{"type":44,"value":1460},"Resources",{"type":39,"tag":53,"props":1462,"children":1463},{},[1464,1476],{"type":39,"tag":57,"props":1465,"children":1466},{},[1467],{"type":39,"tag":1468,"props":1469,"children":1473},"a",{"href":1470,"rel":1471},"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk",[1472],"nofollow",[1474],{"type":44,"value":1475},"grafana-app-sdk GitHub",{"type":39,"tag":57,"props":1477,"children":1478},{},[1479],{"type":39,"tag":1468,"props":1480,"children":1483},{"href":1481,"rel":1482},"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Fapp",[1472],[1484],{"type":44,"value":1485},"app package docs",{"type":39,"tag":1487,"props":1488,"children":1489},"style",{},[1490],{"type":44,"value":1491},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1493,"total":1600},[1494,1511,1528,1534,1551,1567,1585],{"slug":1495,"name":1495,"fn":1496,"description":1497,"org":1498,"tags":1499,"stars":22,"repoUrl":23,"updatedAt":1510},"adaptive-metrics","optimize Grafana Cloud metrics costs","Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact\u002Fregex rules, label-drop config, unused-metric detection, and Alloy remote_write fallback. Use when investigating a high Mimir\u002FGrafana Cloud bill, hunting high-cardinality labels (`pod_uid`, `service_instance_id`, `version`), pre-aggregating counters\u002Fgauges, dropping unused metrics, or measuring `grafanacloud_instance_active_series` before\u002Fafter — even when the user says \"reduce cardinality\", \"too many series\", \"metrics spend\", \"active series count is exploding\", or \"drop the version label\" without naming Adaptive Metrics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1500,1503,1504,1507],{"name":1501,"slug":1502,"type":15},"Cost Optimization","cost-optimization",{"name":9,"slug":8,"type":15},{"name":1505,"slug":1506,"type":15},"Metrics","metrics",{"name":1508,"slug":1509,"type":15},"Observability","observability","2026-07-12T07:44:27.451068",{"slug":1512,"name":1512,"fn":1513,"description":1514,"org":1515,"tags":1516,"stars":22,"repoUrl":23,"updatedAt":1527},"admin","manage Grafana Cloud accounts and RBAC","Manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO\u002FSAML\u002FOAuth\u002FGitHub auth, service accounts for CI\u002FCD, user invites, team membership, and API-driven provisioning. Creates stacks via the Cloud API, mints service-account tokens, applies role assignments, configures SSO providers, and provisions teams\u002Ffolders\u002Fdashboards via Terraform. Use when managing Grafana Cloud access, configuring SSO\u002FSAML\u002FOAuth, setting up service accounts for Terraform\u002FCI\u002FCD, assigning RBAC roles, inviting users, managing multiple stacks or organizations, provisioning cloud resources via API or Terraform, or auditing admin actions — even when the user says \"set up SSO\", \"create a stack\", \"make a service account\", or \"onboard a team\" without explicitly saying \"admin\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1517,1520,1523,1524],{"name":1518,"slug":1519,"type":15},"Access Control","access-control",{"name":1521,"slug":1522,"type":15},"Auth","auth",{"name":9,"slug":8,"type":15},{"name":1525,"slug":1526,"type":15},"Operations","operations","2026-07-12T07:44:12.078436",{"slug":4,"name":4,"fn":5,"description":6,"org":1529,"tags":1530,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1531,1532,1533],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"slug":1535,"name":1535,"fn":1536,"description":1537,"org":1538,"tags":1539,"stars":22,"repoUrl":23,"updatedAt":1550},"alerting-irm","configure Grafana Alerting and Incident Management","Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack\u002FPagerDuty\u002Femail\u002Fwebhook), notification policies with hierarchical matchers, silences, mute timings, on-call schedules and escalation chains, incident-management integrations, and SLOs with multi-window burn-rate alerts. Use when configuring alerts, debugging notification routing, setting up on-call rotations, declaring or managing incidents, defining SLOs, provisioning alerting via YAML or API, picking matchers for a notification policy, building a PagerDuty\u002FSlack webhook receiver, or troubleshooting why an alert isn't firing — even when the user says \"page me on errors\", \"alert me when X happens\", \"route this to the platform team\", or \"set up an SLO\" without naming Alerting or IRM.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1540,1543,1544,1547],{"name":1541,"slug":1542,"type":15},"Alerting","alerting",{"name":9,"slug":8,"type":15},{"name":1545,"slug":1546,"type":15},"Incident Response","incident-response",{"name":1548,"slug":1549,"type":15},"Monitoring","monitoring","2026-07-12T07:44:02.393397",{"slug":1552,"name":1552,"fn":1553,"description":1554,"org":1555,"tags":1556,"stars":22,"repoUrl":23,"updatedAt":1566},"alloy","build unified telemetry pipelines with Grafana Alloy","Build a unified telemetry pipeline with Grafana Alloy — one OpenTelemetry-compatible binary that collects metrics, logs, traces, and profiles and ships to Grafana Cloud \u002F Prometheus \u002F Loki \u002F Tempo \u002F Pyroscope. Covers the Alloy config language (blocks, `sys.env`, component refs), `prometheus.scrape` → `remote_write`, `loki.source.file` + `loki.process` → `loki.write`, `otelcol.receiver.otlp` → `otelcol.exporter.otlp`, `pyroscope.scrape`, K8s \u002F Docker \u002F EC2 discovery, relabeling, modules (`import.file\u002Fgit\u002Fhttp`), clustering, Fleet Management `remotecfg`, the Alloy UI at `:12345`, and `alloy fmt` \u002F `alloy validate`. Use when writing a `config.alloy`, replacing Grafana Agent \u002F OTel Collector, scraping K8s pods, parsing logs, ingesting OTLP, or debugging \"Alloy isn't sending anything\" — even when the user says \"set up the agent\", \"write me a scrape config\", \"drop these logs before sending\", or \"OTel collector config\" without naming Alloy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1557,1558,1561,1562,1563],{"name":9,"slug":8,"type":15},{"name":1559,"slug":1560,"type":15},"Logs","logs",{"name":1505,"slug":1506,"type":15},{"name":1508,"slug":1509,"type":15},{"name":1564,"slug":1565,"type":15},"OpenTelemetry","opentelemetry","2026-07-12T07:43:54.817139",{"slug":1568,"name":1568,"fn":1569,"description":1570,"org":1571,"tags":1572,"stars":22,"repoUrl":23,"updatedAt":1584},"app-observability","monitor application performance in Grafana Cloud","Get RED metrics + service maps + frontend RUM + AI\u002FLLM monitoring out of Grafana Cloud — Application Observability (`traces_spanmetrics_*` from OTel traces, p50\u002Fp95\u002Fp99 latency, exemplar-to-trace, traces-to-logs \u002F profiles), Frontend Observability with the Faro Web SDK (Core Web Vitals, session replay, `pushError`, React + router integration, `TracingInstrumentation` for browser → backend trace correlation), and AI Observability via OpenLIT (token \u002F cost \u002F latency, GPU, hallucination + toxicity evals). Use when standing up APM for a service, wiring an Alloy OTLP receiver + forwarding to Cloud, instrumenting a React frontend for RUM, debugging why service-map edges are missing, monitoring LLM cost drift, or correlating a frontend error to its backend trace — even when the user says \"set up APM\", \"show service map\", \"monitor browser perf\", \"session replay\", \"RUM SDK\", or \"watch our OpenAI bill\" without naming App \u002F Frontend \u002F AI Observability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1573,1576,1579,1580,1583],{"name":1574,"slug":1575,"type":15},"APM","apm",{"name":1577,"slug":1578,"type":15},"Distributed Tracing","distributed-tracing",{"name":9,"slug":8,"type":15},{"name":1581,"slug":1582,"type":15},"LLM","llm",{"name":1508,"slug":1509,"type":15},"2026-07-12T07:44:34.500406",{"slug":1586,"name":1586,"fn":1587,"description":1588,"org":1589,"tags":1590,"stars":22,"repoUrl":23,"updatedAt":1599},"app-sdk-concepts","scaffold and configure Grafana apps","Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a Grafana App Platform app, picking a deployment mode (standalone operator \u002F grafana\u002Fapps \u002F frontend-only), wiring app-specific config, or onboarding to the SDK. Covers `grafana-app-sdk` CLI install, `project init` per deployment mode, project layout, the schema-centric workflow (CUE kinds → generated code → reconciler\u002Fadmission logic), and `SpecificConfig` for env-driven app configuration. Use even if the user just says \"make a new app\", \"Grafana app platform\", \"kinds and watchers\", \"operator scaffold\", or asks about `apps\u002F` inside the Grafana repo, without naming the SDK explicitly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1591,1592,1595,1598],{"name":20,"slug":21,"type":15},{"name":1593,"slug":1594,"type":15},"Deployment","deployment",{"name":1596,"slug":1597,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-12T07:45:08.595757",48,{"items":1602,"total":1782},[1603,1618,1637,1657,1672,1686,1699,1714,1731,1744,1757,1770],{"slug":1604,"name":1604,"fn":1605,"description":1606,"org":1607,"tags":1608,"stars":1615,"repoUrl":1616,"updatedAt":1617},"faro-setup-web","instrument web apps with Grafana Faro","Instruments a web app with Grafana Faro Web SDK for frontend observability. Use when setting up error tracking, Web Vitals, session monitoring, or distributed tracing in a browser app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1609,1610,1613,1614],{"name":1577,"slug":1578,"type":15},{"name":1611,"slug":1612,"type":15},"Frontend","frontend",{"name":1548,"slug":1549,"type":15},{"name":1508,"slug":1509,"type":15},1103,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Ffaro-web-sdk","2026-07-12T07:43:24.63314",{"slug":1619,"name":1619,"fn":1620,"description":1621,"org":1622,"tags":1623,"stars":1634,"repoUrl":1635,"updatedAt":1636},"configuring-yesoreyeram-infinity-datasource","configure Grafana Infinity data source","Configure the Infinity data source — base URL and allowed hosts, the authentication methods (basic, bearer token, API key, digest, OAuth passthrough, OAuth 2.0 client credentials\u002FJWT, Azure, Azure Blob, AWS), TLS, custom HTTP headers, network and security settings, the custom health check, and provisioning with a config file. Use when a user asks how to set up, configure, or change settings for the Infinity data source; how to authenticate to an API; how to allow hosts; how to provision it as YAML; or how to troubleshoot connection, authentication, or health-check issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1624,1627,1630,1633],{"name":1625,"slug":1626,"type":15},"API Development","api-development",{"name":1628,"slug":1629,"type":15},"Authentication","authentication",{"name":1631,"slug":1632,"type":15},"Configuration","configuration",{"name":9,"slug":8,"type":15},1056,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-infinity-datasource","2026-07-12T07:43:25.939136",{"slug":1638,"name":1638,"fn":1639,"description":1640,"org":1641,"tags":1642,"stars":1634,"repoUrl":1635,"updatedAt":1656},"querying-yesoreyeram-infinity-datasource","query data with Infinity datasource","Build queries with the Infinity data source — the query types (JSON, CSV, TSV, XML, GraphQL, HTML, UQL, GROQ, Google Sheets, Series, Transformations), the parsers (Frontend\u002Fsimple, Backend JSONata, JQ, UQL, GROQ) and which support alerting, the sources (URL, Inline, Reference, Azure Blob, Random walk), output formats (table, timeseries, logs, trace, node graph, dataframe), root selector and columns, computed columns\u002Ffilters\u002Fsummarize, pagination, and template variables. Use when a user asks how to query Infinity; how to fetch JSON\u002FCSV\u002FXML\u002FGraphQL\u002FHTML from a URL or inline; how to select rows and columns; how to transform data with UQL\u002FGROQ\u002FJSONata\u002FJQ; how to make a query work with alerting; how to paginate; or how to use variables in a query.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1643,1646,1649,1650,1653],{"name":1644,"slug":1645,"type":15},"CSV","csv",{"name":1647,"slug":1648,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":1651,"slug":1652,"type":15},"GraphQL","graphql",{"name":1654,"slug":1655,"type":15},"JSON","json","2026-07-15T05:34:05.773947",{"slug":1658,"name":1658,"fn":1659,"description":1660,"org":1661,"tags":1662,"stars":1669,"repoUrl":1670,"updatedAt":1671},"agento11y","manage Grafana Agent Observability resources","Inspects and manages Grafana Agent Observability resources via gcx: conversations, generations, evaluators, rules, scores, and templates. Use when the user wants to list or search conversations, inspect generations, manage evaluators (upsert, test, delete), set up evaluation rules, check scores, or browse evaluator templates. Trigger on phrases like \"list conversations\", \"search generations\", \"what did the agent do\", \"debug LLM conversation\", \"create evaluator\", \"set up evaluation rule\", \"test evaluator\", \"check scores\", \"evaluate generation quality\", or \"set up online evaluation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1663,1666,1667,1668],{"name":1664,"slug":1665,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":1548,"slug":1549,"type":15},{"name":1508,"slug":1509,"type":15},430,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx","2026-07-25T05:30:40.29622",{"slug":1673,"name":1673,"fn":1674,"description":1675,"org":1676,"tags":1677,"stars":1669,"repoUrl":1670,"updatedAt":1685},"agento11y-instrument","instrument LLM apps for agent observability","Sets up and instruments a developer's own LLM app or agent to send generations and agentic workflow to Grafana Agent Observability (the Agent Observability SDKs) — greenfield setup, fixing broken instrumentation, or filling gaps in existing instrumentation. Uses gcx for the parts a static prompt can't do: `gcx login` \u002F `gcx cloud stacks` to find the stack, and `gcx agento11y agents|conversations|generations` to VERIFY that data actually lands — so it iterates (instrument → run → verify → fix) until generations arrive, not blindly. Reads the app's code, detects language\u002Fframework, classifies instrumentation state (none \u002F partial \u002F broken), then runs a fixed gap checklist whose #1 item is the silent failure no other prompt catches: the SDK emits OTel spans\u002Fmetrics but never creates a TracerProvider\u002FMeterProvider, so without them all metrics go to a no-op and are lost. Also checks agent_version (required for per-version Performance charts), set_result completeness, SYNC vs STREAM, parent_generation_ids DAG links, and workflow-step coverage. Recommends changes citing file:line and, only with explicit confirmation, applies minimal diffs that don't change app behavior. Pulls SDK reference from agento11y's llms.txt rather than restating it, and hands off to `agento11y-test-starter` once data flows. It does NOT write test suites or set up tenant evaluations, rules, or guards — offline test suites are `agento11y-test-starter`, tenant eval rules + guards are `agento11y-prod-setup`; does NOT install coding-agent telemetry plugins (that is llms.txt \"Path A\"); does NOT mint or store credentials or invent endpoints. Trigger on phrases like \"instrument my app\", \"send my agent's traces to Grafana\", \"set up AI observability for my app\", \"my generations aren't showing up\", \"why is Performance empty\", \"add Agent Observability to my code\", \"fix my instrumentation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1678,1679,1680,1683,1684],{"name":1664,"slug":1665,"type":15},{"name":9,"slug":8,"type":15},{"name":1681,"slug":1682,"type":15},"Instrumentation","instrumentation",{"name":1581,"slug":1582,"type":15},{"name":1508,"slug":1509,"type":15},"2026-07-31T05:53:52.580237",{"slug":1687,"name":1687,"fn":1688,"description":1689,"org":1690,"tags":1691,"stars":1669,"repoUrl":1670,"updatedAt":1698},"agento11y-prod-setup","setup production evaluation for AI agents","Sets up production evaluation and guardrails for a DEPLOYED AI agent in Grafana Agent Observability, grounded in the agent's own code and its real ingested traffic. The judgment layer on top of the `agento11y` skill: it reads the agent's source (system prompt, tools, entrypoint) AND samples its live traffic via gcx, checks what evaluators\u002Frules\u002Fguards already exist, then recommends only what's missing — online eval rules (score live conversations for regressions) and guards (warn-first request-path policies that redact \u002F tool-filter and may later be promoted to deny). It drafts reviewable YAML and, only with explicit confirmation, applies via `gcx agento11y`. New guards are drafted in warn mode (safe on live traffic — warn records but never blocks). It DOES create stack-level objects — that is the point — but every write is confirmed. It never rewrites or redeploys the agent. Trigger on phrases like \"set up production evaluation\", \"my agent is in prod what should I evaluate\", \"catch quality regressions\", \"add guardrails to my agent\", \"redact PII from my agent\", \"block dangerous tools\", \"set up online evals and guards\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1692,1693,1696,1697],{"name":1664,"slug":1665,"type":15},{"name":1694,"slug":1695,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":1508,"slug":1509,"type":15},"2026-07-31T05:53:53.576347",{"slug":1700,"name":1700,"fn":1701,"description":1702,"org":1703,"tags":1704,"stars":1669,"repoUrl":1670,"updatedAt":1713},"agento11y-test-starter","build and run agent test suites","Use early in an AI-agent project — before ship, before real traffic — to build a starter test suite for the agent and run it offline. Reads the agent's own code (system prompt, tools, task), writes a labeled draft suite of test cases (happy\u002Fedge\u002Fadversarial) grounded in real lines, and recommends how to score each case (the evaluators\u002Fjudges the offline runner uses). Assesses how runnable the agent is: for an easily-invoked agent it generates a runner stub (run_experiment.py) with two holes to fill and can optionally run it (only with permission, only against the endpoint the developer configured); for agents needing a harness or full runtime it points to the existing eval infra. It runs OFFLINE and never creates tenant-level evaluators, rules, or guards — that is `agento11y-prod-setup`, for a deployed agent with real traffic. Trigger on phrases like \"how do I test my agent before shipping\", \"write test cases for my agent\", \"set up tests for my agent\", \"check my agent before prod\", \"I have no traffic yet, how do I evaluate it\", \"test my agent offline\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1705,1706,1707,1710],{"name":1664,"slug":1665,"type":15},{"name":9,"slug":8,"type":15},{"name":1708,"slug":1709,"type":15},"QA","qa",{"name":1711,"slug":1712,"type":15},"Testing","testing","2026-07-31T05:53:51.62785",{"slug":1715,"name":1715,"fn":1716,"description":1717,"org":1718,"tags":1719,"stars":1669,"repoUrl":1670,"updatedAt":1730},"create-dashboard","create Grafana dashboards with gcx","Designs and creates Grafana dashboards with gcx, using `gcx dashboards snapshot` as a visual feedback loop. Use when the user wants to create a new Grafana dashboard, add panels, variables, or annotations to an existing dashboard, design dashboard panels, variables, queries, or layout, or make a material visual redesign. Triggers on \"create dashboard\", \"new dashboard\", \"build dashboard\", \"dashboard for \u003Cservice>\", \"add panels\", \"add variable\", \"add annotation\", \"improve this dashboard\", or \"iterate on a dashboard\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1720,1723,1726,1729],{"name":1721,"slug":1722,"type":15},"Dashboards","dashboards",{"name":1724,"slug":1725,"type":15},"Data Visualization","data-visualization",{"name":1727,"slug":1728,"type":15},"Design","design",{"name":9,"slug":8,"type":15},"2026-07-25T05:30:46.289717",{"slug":1732,"name":1732,"fn":1733,"description":1734,"org":1735,"tags":1736,"stars":1669,"repoUrl":1670,"updatedAt":1743},"debug-with-grafana","investigate application issues with Grafana","Structured workflow for investigating application problems with Grafana observability data (metrics, logs, traces) via gcx. Covers live firefighting AND retrospective incident analysis: incident triage, root-cause analysis, blast-radius checks (did an incident spill into other services), verifying whether a deployment or rollout triggered an incident, finding which service, endpoint, or path owns the most errors or slow requests, checking whether retries or queue backlogs piled up, and quantifying error or latency shares over a time window. Trigger on: \"my API is returning 500 errors\", \"latency is spiking\", \"investigate why requests are failing\", \"triage the incident\", \"blast radius\", \"root cause\", \"did the rollout cause it\", \"which endpoint owns the most 5xx\", \"did retries pile up\", or any request to analyse an earlier incident window using telemetry. For authoring dashboards use create-dashboard; for dashboard inventory use manage-dashboards.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1737,1740,1741,1742],{"name":1738,"slug":1739,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":1545,"slug":1546,"type":15},{"name":1508,"slug":1509,"type":15},"2026-07-18T05:11:10.445428",{"slug":1745,"name":1745,"fn":1746,"description":1747,"org":1748,"tags":1749,"stars":1669,"repoUrl":1670,"updatedAt":1756},"diagnose-entity-graph","diagnose Grafana Entity Graph issues","Diagnose Entity Graph problems: missing entities, missing edges, disconnected clusters, or filtering issues. Use when the user reports that Entity Graph doesn't look right, services are missing, edges aren't appearing, or environments can't be filtered. Triggers for: \"entity graph is empty\", \"services missing from entity graph\", \"no edges in entity graph\", \"disconnected services\", \"can't filter entity graph\", \"entity graph not working\", \"diagnose entity graph\", \"debug knowledge graph\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1750,1751,1752,1755],{"name":1738,"slug":1739,"type":15},{"name":9,"slug":8,"type":15},{"name":1753,"slug":1754,"type":15},"Graph Analysis","graph-analysis",{"name":1508,"slug":1509,"type":15},"2026-07-25T05:30:39.380934",{"slug":1758,"name":1758,"fn":1759,"description":1760,"org":1761,"tags":1762,"stars":1669,"repoUrl":1670,"updatedAt":1769},"gcx","manage Grafana Cloud resources via gcx","Manages Grafana Cloud resources via the gcx CLI. Trigger when the user wants to inspect, create, update, delete, query, or automate any Grafana resource - dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents, fleet, k6, knowledge graph, or adaptive telemetry.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1763,1766,1767,1768],{"name":1764,"slug":1765,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},{"name":1548,"slug":1549,"type":15},{"name":1525,"slug":1526,"type":15},"2026-07-31T05:53:50.587304",{"slug":1771,"name":1771,"fn":1772,"description":1773,"org":1774,"tags":1775,"stars":1669,"repoUrl":1670,"updatedAt":1781},"gcx-demo","present gcx demo tours","Run a narrated, read-only demo tour of gcx for customer or colleague presentations. Showcases the breadth of gcx across every Grafana Cloud product area — resources, datasources, metrics, logs, traces, SLOs, alerts, synthetic monitoring, IRM, k6, fleet, and more. All commands are strictly read-only. Trigger when the user says \"demo gcx\", \"show off gcx\", \"customer demo\", \"gcx tour\", or \"\u002Fgcx-demo\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1776,1777,1778],{"name":1764,"slug":1765,"type":15},{"name":9,"slug":8,"type":15},{"name":1779,"slug":1780,"type":15},"Presentations","presentations","2026-07-25T05:30:45.282458",80]