Skip to content

Add crossplane resource simulate #368

Description

@haarchri

What

Add crossplane resource simulate as an alpha command, per the accepted design (crossplane/cli#181,design/one-pager-cli-simulate.md): given YAML for one or more MRs (-f), show what applying them would do.

  • For each input resource, fetch the live MR from the cluster if one exists.
  • Diff desired against live spec client-side; this is the [?] approximate path from the design, and until the plan layer exists every resource takes it, marked accordingly.
  • A resource with no live counterpart plans as a create.
  • Summary line and -o plan|diff|json|yaml, shared with project simulate

Acceptance criteria

  • crossplane resource simulate -f resources.yaml (alpha) previews creates and updates against the current kubeconfig context.
  • Output marks all results as approximate ([?]) until the plan layer exists, with the documented closing warning.
  • Output formats and summary shared with project simulate (no second implementation).

Out of scope

  • Plan servers and provider-computed diffs, --all provider upgrade preview, --provider-images (follow-up issue: plan layer).

Dependencies

Depends on the work in #367

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions