Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to retain namespace while operator deletion #1807

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

shtripat
Copy link
Contributor

Using a command line flag --retain-namespace under command kubectl minio delete it would retain the namespace and delete all other resources.

$ kubectl minio delete minio --help 

'delete' command delete MinIO Operator along with all the tenants.

Usage:
  minio delete [flags]

Examples:
  kubectl minio delete

Flags:
  -d, --dangerous          confirm deletion
  -f, --force              allow without confirmation
  -h, --help               help for delete
  -n, --namespace string   namespace scope for this request (default "minio-operator")
  -r, --retain-namespace   retain operator namespace

Global Flags:

Fixes: #1112

Steps to verify changes

  1. Deploy MinIO operator
$ kubectl minio init --namespace CUSTOM-NS
  1. Remove MinIO operator with --retain-namespace flag
$ kubectl minio delete --namespace CUSTOM-NS -d -f -r

it should not delete the namespace
3. Repeat step-2 withou -r option and namespace should get deleted

Using a command line flag `--retain-namespace` under command
`kubectl minio delete` it would retain the namespace and delete
all other resources.

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
@harshavardhana harshavardhana merged commit 61bb830 into minio:master Oct 16, 2023
24 checks passed
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.

deleting namespace when execute the command "kubectl minio delete --namespace=NAMESPACE"
3 participants