karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.49k stars 890 forks source link

not clean apiservices.apiregistration validatingwebhookconfigurations mutatingwebhookconfigurations clusterroles.rbac on helm uninstall #3816

Open wu0407 opened 1 year ago

wu0407 commented 1 year ago

What happened:

  1. In .Values.installMode=="host" and .Values.certs.mode "auto" The apiservices.apiregistration validatingwebhookconfigurations mutatingwebhookconfigurations clusterroles.rbac configmap and so on remain in cluster after helm uninstall. https://github.com/karmada-io/karmada/blob/d27faeac953043c2274bb8787bbbaaafa7d0dcd6/charts/karmada/templates/pre-install-job.yaml#L74-L90 The root case is post-delete-job not mount static-resources configmap https://github.com/karmada-io/karmada/blob/d27faeac953043c2274bb8787bbbaaafa7d0dcd6/charts/karmada/templates/post-delete-job.yaml#L45-L92
  2. In .Values.installMode=="host" and .Values.certs.mode "custom" not clean any resource that create by post-install-job https://github.com/karmada-io/karmada/blob/d27faeac953043c2274bb8787bbbaaafa7d0dcd6/charts/karmada/templates/post-install-job.yaml#L1-L3

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

calvin0327 commented 1 year ago

Thanks your feedback.

/assign

Poor12 commented 1 year ago

Thanks for reminding. We only support cleanup when certs mode is "auto". I think we should support it when certs mode is "custom" BTW, rbac cannot be auto cleanup, see https://github.com/karmada-io/karmada/tree/master/charts/karmada#uninstalling-the-chart.