upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

Add CRUD support for spaces groups #466

Closed RedbackThomson closed 5 months ago

RedbackThomson commented 5 months ago

Description of your changes

Rebased on top of https://github.com/upbound/up/pull/457

Add support for up group create/list/get/delete using the selected spaces kubeconfig.

I have:

How has this code been tested

$ go run ./cmd/up group list
NAME   PROTECTED

$ go run ./cmd/up group create nick-unprotected
nick-unprotected created
$ go run ./cmd/up group create nick-protected --deletion-protection
nick-protected created
$ go run ./cmd/up group list
NAME               PROTECTED
nick-protected     true
nick-unprotected   false

$ go run ./cmd/up group get nick-protected
NAME             PROTECTED
nick-protected   true

$ go run ./cmd/up group delete nick-protected
up: error: group.deleteCmd.Run(): Deletion protection is enabled on the specified group. Use '--force' to delete anyway.
exit status 1
$ go run ./cmd/up group delete nick-protected --force
nick-protected deleted
$ go run ./cmd/up group delete nick-unprotected
nick-unprotected deleted