{"id":"6ef47853-4359-4236-b02e-300738c7da78","slug":"hjjzs-kubebuilder-patterns","name":"kubebuilder-patterns","description":"Kubebuilder/controller-runtime design patterns guide for building production-ready Kubernetes controllers. Use when developing, reviewing, or debugging Kubernetes operators and controllers, implementing reconciliation logic, managing resource lifecycle, handling concurrent updates, integrating external services, or following Kubernetes controller best practices.","canonicalUrl":"https://www.xpersona.co/skill/hjjzs-kubebuilder-patterns","sourceUrl":"https://github.com/hjjzs/kubebuilder-patterns","homepage":null,"source":"GITHUB_OPENCLEW","vendor":{"slug":"hjjzs","label":"Hjjzs","url":"https://github.com/hjjzs/kubebuilder-patterns"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":null,"freshnessAt":"2026-04-15T02:16:49.525Z","freshnessLabel":"Apr 15, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Apr 15, 2026"},{"label":"Vendor","value":"Hjjzs"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"Unpublished"}],"factsPreview":[{"factKey":"docs_crawl","label":"Crawlable docs","value":"6 indexed pages on the official domain","category":"integration","href":"https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar","sourceUrl":"https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar","sourceType":"search_document","confidence":"medium","observedAt":"2026-04-15T05:03:46.393Z","isPublic":true,"metadata":{}},{"factKey":"vendor","label":"Vendor","value":"Hjjzs","category":"vendor","href":"https://github.com/hjjzs/kubebuilder-patterns","sourceUrl":"https://github.com/hjjzs/kubebuilder-patterns","sourceType":"profile","confidence":"medium","observedAt":"2026-04-15T02:16:49.525Z","isPublic":true,"metadata":{}},{"factKey":"protocols","label":"Protocol compatibility","value":"OpenClaw","category":"compatibility","href":"https://www.xpersona.co/api/v1/agents/hjjzs-kubebuilder-patterns/contract","sourceUrl":"https://www.xpersona.co/api/v1/agents/hjjzs-kubebuilder-patterns/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-04-15T02:16:49.525Z","isPublic":true,"metadata":{}},{"factKey":"handshake_status","label":"Handshake status","value":"UNKNOWN","category":"security","href":"https://www.xpersona.co/api/v1/agents/hjjzs-kubebuilder-patterns/trust","sourceUrl":"https://www.xpersona.co/api/v1/agents/hjjzs-kubebuilder-patterns/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true,"metadata":{}}],"highlights":["Trust evidence available"],"agentCard":{"name":"kubebuilder-patterns","description":"Kubebuilder/controller-runtime design patterns guide for building production-ready Kubernetes controllers. Use when developing, reviewing, or debugging Kubernetes operators and controllers, implementing reconciliation logic, managing resource lifecycle, handling concurrent updates, integrating external services, or following Kubernetes controller best practices.","source":"GITHUB_OPENCLEW","sourceId":"github:1149336246","repository":"https://github.com/hjjzs/kubebuilder-patterns","documentation":"https://www.xpersona.co/skill/hjjzs-kubebuilder-patterns/agent/hjjzs-kubebuilder-patterns","protocols":["OPENCLEW"],"languages":["typescript"],"install":{"command":"git clone https://github.com/hjjzs/kubebuilder-patterns.git","ecosystem":"git"},"examples":[{"kind":"example","language":"go","snippet":"func (r *MyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {\n    logger := log.FromContext(ctx)\n    \n    // 1. Fetch resource\n    obj := &MyResource{}\n    if err := r.Get(ctx, req.NamespacedName, obj); err != nil {\n        return ctrl.Result{}, client.IgnoreNotFound(err)\n    }\n    \n    // 2. Handle deletion (Finalizer pattern)\n    if !obj.DeletionTimestamp.IsZero() {\n        return r.handleDeletion(ctx, obj)\n    }\n    \n    // 3. Ensure Finalizer\n    if err := r.ensureFinalizer(ctx, obj); err != nil {\n        return ctrl.Result{}, err\n    }\n    \n    // 4. Execute Pipeline\n    for _, fn := range r.reconcilePipeline {\n        if err := fn(ctx, obj); err != nil {\n            logger.Error(err, \"pipeline step failed\")\n            r.Recorder.Eventf(obj, corev1.EventTypeWarning, \"SyncFailed\", \"%v\", err)\n            return ctrl.Result{}, err\n        }\n    }\n    \n    // 5. Update Phase (Phase Derivation pattern)\n    return r.syncPhase(ctx, obj)\n}"}]}}