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

CRDs are not deleted when provider is removed #120

Open
Fedosin opened this issue May 30, 2023 · 4 comments
Open

CRDs are not deleted when provider is removed #120

Fedosin opened this issue May 30, 2023 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Fedosin
Copy link
Contributor

Fedosin commented May 30, 2023

What steps did you take and what happened:

  1. Install a provider:
apiVersion: operator.cluster.x-k8s.io/v1alpha1
kind: CoreProvider
metadata:
  name: cluster-api
  namespace: capi-system
spec:
  version: v1.4.2
  1. Delete the provider
  2. Ensure that all previously created CRDs from cluster.x-k8s.io are not deleted together with the provider.

What did you expect to happen:
All created resources should be removed.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api-operator version: main
  • Cluster-api version: 1.4.2
  • Minikube/KIND version: 1.27
  • Kubernetes version: (use kubectl version): 1.27
  • OS (e.g. from /etc/os-release):

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api-operator/labels?q=area for the list of labels]

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 30, 2023
@Fedosin
Copy link
Contributor Author

Fedosin commented May 30, 2023

After some consideration it seems like a bad idea, because we will also need to delete all user created objects like Cluster or Machine.

@Fedosin Fedosin closed this as completed May 30, 2023
@Fedosin Fedosin reopened this Jun 18, 2023
@Fedosin
Copy link
Contributor Author

Fedosin commented Jun 18, 2023

After some consideration it seems like a good idea, but we need to differentiate scenarios when we delete resources during provider upgrade, and when we delete the provider itself completely.

@alexander-demicev
Copy link
Contributor

Another option is to introduce a deletion policy API field, which doesn't remove CRDs by default

@alexander-demicev
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
3 participants