Skip to content

Add k8s.apply operation with dry-run support #11

Description

@Cali0707

Description

Add a k8s.apply operation to apply Kubernetes manifests with support for server-side dry-run. This is needed for the create-network-policy task which compares live resources against desired state using dry-run.

Current bash tasks use patterns like:

  • kubectl apply -f manifest.yaml
  • kubectl apply -f manifest.yaml --dry-run=server -o json

Requirements

  • Support applying inline YAML/JSON manifests
  • Support applying from file path references
  • Support server-side dry-run mode for validation without mutation

Example Usage

Apply from file:

- k8s.apply:
    file: artifacts/deployment.yaml

Apply with dry-run:

- k8s.apply:
    file: artifacts/desired-policy.yaml
    dryRun: server

Acceptance Criteria

  • Can apply a manifest from a file path
  • Can apply a manifest provided inline
  • Supports dryRun: server for validation without mutation
  • Handles validation errors gracefully
  • Operation is documented in extension manifest

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions