Skip to content

Dry-run and validation for mutating operations #2860

@vdemeester

Description

@vdemeester

Summary

Agents should be able to preview the effect of mutating operations before executing them. A --dry-run flag on all mutating commands enables agents to validate actions and present them to users for confirmation.

Proposal

  • Add --dry-run flag to all mutating operations (create, delete, start)
  • Perform local validation before Kubernetes API calls
  • Return would-be changes in structured JSON format
  • Enable agents to preview actions before execution

Acceptance Criteria

  • --dry-run flag available on all mutating commands
  • Dry-run performs local validation and reports errors
  • Output shows what would happen in structured JSON (when --output json is used)
  • No actual Kubernetes API mutations occur during dry-run

Context

Part of #2849 — making tkn agent-friendly.

Note: Kubernetes already supports server-side dry-run (--dry-run=server). This may leverage that mechanism where applicable, but should also cover tkn-specific validation (e.g., parameter completeness for tkn pipeline start).

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions