Skip to content

feat: rename --force to --skip-confirm, add --force for graceful deletion bypass#29

Merged
alikhil merged 2 commits intomainfrom
copilot/rename-force-flag-to-skip-confirm
Feb 24, 2026
Merged

feat: rename --force to --skip-confirm, add --force for graceful deletion bypass#29
alikhil merged 2 commits intomainfrom
copilot/rename-force-flag-to-skip-confirm

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

The --force flag conflated two distinct behaviors: skipping confirmation prompts and bypassing graceful deletion. This renames the existing flag and introduces a proper --force semantically aligned with kubectl delete --force.

Changes

  • --force--skip-confirm (-y): Existing flag renamed; skips the interactive confirmation prompt before delete/patch/exec actions
  • New --force flag: Only valid with --delete; sets GracePeriodSeconds: 0 on delete requests, immediately removing resources from the API and bypassing graceful termination
  • Validation: Returns an error if --force is used without --delete

Usage

# Skip confirmation prompt (renamed flag)
kubectl find pods --status failed -A --delete --skip-confirm

# Immediately remove resources, bypassing graceful deletion (new --force behavior)
kubectl find pods --status failed -A --delete --force

# Combine both: no prompt + immediate deletion
kubectl find pods --status failed -A --delete --force --skip-confirm

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…raceful deletion bypass

Co-authored-by: alikhil <7482065+alikhil@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename current --force flag to --skip-confirm and add new --force flag feat: rename --force to --skip-confirm, add --force for graceful deletion bypass Feb 24, 2026
Copilot AI requested a review from alikhil February 24, 2026 06:55
@alikhil alikhil marked this pull request as ready for review February 24, 2026 07:09
@alikhil alikhil merged commit 1a80a32 into main Feb 24, 2026
4 checks passed
@alikhil alikhil deleted the copilot/rename-force-flag-to-skip-confirm branch February 24, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants