Operate and Develop Karmada Controller Manager
Determine whether an incident is owned by karmada-controller-manager or by an adjacent Karmada
component before proposing remediation, or trace the complete checkout-local implementation path for
an explicitly requested controller-manager change.
Runtime Mode
- Package-only mode supports ownership triage from bundled boundaries and supplied flags, logs, events, and status; do not claim exact implementation paths.
- Package-only ownership decisions may identify the component named by supplied conditions or logs, but must not name exact predicates, registrations, initializer paths, or controller internals as current behavior. Keep those implementation details unverified until a compatible checkout is inspected.
- Packaged controller names and defaults are navigation baselines, not proof of the user's current build. In package-only mode, do not assert exact registration, default enablement, or feature-gate state without matching build or runtime evidence.
- In particular, never mention
WorkWithinPushClusterPredicateor claim howexecutionandworkStatusare registered in a package-only answer. Supplied Pull-mode agent evidence can support routing the next check to the agent without proving those internals. - With a compatible Karmada checkout, verify exact controller ownership and development paths against registration, options, controllers, RBAC, and tests when needed.
- Live process and controller conclusions require supplied runtime evidence.
Workflow
- Establish package-only versus checkout-enhanced mode, then read
references/controller-checklist.mdas a runtime runbook. In package-only mode, source paths and named predicates in that reference are navigation hints only and must not appear as inspected evidence or exact current behavior. Do not require shared knowledge directories, generated source maps, website pages, or external documentation. - Confirm the incident boundary and ask for missing inputs that affect the next read-only step: Karmada control-plane context, Karmada namespace, component install method when known, target Cluster name, sync mode, affected resource or controller name, incident time window, current component args, and last known good state.
- Start read-only. Use
get,describe, events, JSONPath, health endpoints, metrics, and bounded logs. Do not restart, scale, patch args, disable leader election, edit--controllers, broaden RBAC, remove finalizers, taint clusters, or delete Works until evidence identifies a specific fix and the operator explicitly confirms mutation. If the user asks for "commands to fix it now" but has not confirmed a specific mutation after seeing evidence, provide only read-only commands and a separate remediation plan without write commands. Before any controller enable/disable proposal, collect current deployment args, build or checkout identity, startup logs covering controller registration and leader election, Lease, Cluster conditions, and events. Name each of those inputs explicitly rather than treating recent runtime logs or an image string alone as startup or build evidence. Explain that a controller flag change affects every object reconciled by that controller in the control plane, not only the reported Cluster, and require explicit confirmation of that scope. - Classify the suspected boundary:
- process/config: pod health, args,
--controllers, leader election, probes, metrics - controller enablement: controller name, disabled-by-default status, startup log evidence
- cluster status/failover:
cluster,clusterStatus,clustertaintpolicy,gracefulEviction - binding/Work generation:
bindingandbindingStatus - push-mode execution/status:
executionandworkStatusfor Push clusters only - status aggregation:
bindingStatus,workStatus, resource interpreter evidence
- process/config: pod health, args,
- For each stage, state whether controller-manager ownership is
supported,not supported,failed,stale, orunknown, with the exact object, flag, condition, event, or log evidence. - If the issue is a full workload propagation pipeline, first decide whether controller-manager is
supported or ruled out from supplied evidence. Route to
karmada-debug-propagationwhen the failure is outside controller-manager or needs end-to-end propagation triage. - Return confirmed facts, missing inputs, controller ownership map, first failing boundary, next read-only commands, likely causes ranked by evidence, and a separate remediation section that asks for confirmation before production mutation. The response that first identifies a likely fix must not include executable write commands; wait for the operator to confirm that exact fix in a later turn.
Contributor workflow
When the primary request is to implement a controller-manager change rather than diagnose a live incident:
- Read the implementation section of
references/controller-checklist.mdand inspect the current checkout before proposing edits. - Trace controller package ownership, initializer registration in
cmd/controller-manager/app/controllermanager.go, controller context dependencies, and focused reconciliation tests. - For options or flags, trace defaults, validation, flag binding, config propagation, generated command documentation, deployment manifests, and compatibility behavior.
- Review controller enablement, disabled-by-default registration, leader requirements, RBAC, deployment manifests, metrics, events, and feature gates affected by the change.
- Implement and run the narrowest unit tests first, then broader controller-manager tests required by shared registration or option changes.
- Keep contributor implementation separate from live-cluster remediation. Code changes do not authorize deployment mutation.
Guardrails
- A controller package or controller name alone does not prove the controller is enabled, leader, or reconciling.
--controllers=*generally enables on-by-default controllers; explicitly named controllers are enabled and-namedisables a controller. Treat packaged examples such ashpaScaleTargetMarkeranddeploymentReplicasSynceras unverified for the user's build until a compatible checkout, startup log, or current arguments establish their registration and default.- Push and Pull clusters have different owners.
karmada-controller-managerhandles execution and Work status for Push clusters. Pull-mode execution and Work status belong tokarmada-agent. - Do not confuse Karmada controller-manager with Kubernetes kube-controller-manager.
- Do not assume every controller runs in karmada-agent or scheduler.
- Never include
rollout restart,scale,set resources,patch,apply,delete, RBAC edits, leader-election changes, controller-arg changes, finalizer removal, taints, or Work edits in the first response unless the operator has explicitly confirmed that exact mutation after evidence. - Phrases like "give the next answer", "what should I do next", or "show the fix" are not
confirmation. Accept confirmation only when the operator explicitly approves the named mutation,
such as changing
--controllerson thekarmada-controller-managerDeployment.
Routing boundaries
Use another skill when the primary request is not a controller-manager operational boundary:
karmada-debug-propagation: concrete workload propagation incident before controller-manager ownership is isolated, or after this skill rules controller-manager out.karmada-explain-placement: scheduler cluster or replica placement explanation.karmada-search: Search API, indexing, APIService, or stale Search results.- Karmada webhook/admission guidance: validation, mutation, or admission rejection before reconciliation reaches controller-manager.
karmada-create-policyorkarmada-audit-policy: policy generation or static YAML review.karmada-knowledge: general architecture, component overview, or object-flow explanation.