Cluster-api: clusterctl delete doesn't delete provider webhook component

Created on 21 Feb 2020  路  11Comments  路  Source: kubernetes-sigs/cluster-api

What steps did you take and what happened:

  1. Use clusterctl init --infrastructure aws to install provider components
  2. Use clusterctl delete --infrastructure aws.
    I noticed capi-webhook-system/capa-controller-manager is still around.

What did you expect to happen:
I expected it to get deleted.

Anything else you would like to add:
If I do clusterctl delete --infrastructure aws --include-crd then, the capi-webhook-system/capa-controller-manager get deleted.

I'm not sure what the expected behavior is.

Environment:

  • Cluster-api version: 1435eed4f1f4f68458be3bb22e03345c19e6fa01

/kind bug
/area clusterctl

areclusterctl kinbug prioritimportant-soon

Most helpful comment

Makes sense, I鈥檓 going to try to fix it

All 11 comments

/priority important-soon
/milestone v0.3.0-rc.2

what should the behavior be? does it need fixing?

@nader-ziada I think so, the namespace should stay there, but the controller in the webhook-system namespace should go away.

This only applies if you're deleting the last of your providers though, for example if you have 2 CAPA installed, we don't want to remove the webhook deployment until the both are deleted

Makes sense, I鈥檓 going to try to fix it

/assign @nader-ziada

Currently clusterctl splits provider components into two groups:

  • instance specific components (controller, service account etc)
  • shared components (CRDs, web-hooks)
    The second group gets deleted only if explicitly required by the user with the --include-crd flag, as described by @wfernandes , while instance specific components are always deleted

Might be this should be better documented (there is already something in the doc, but apparently it is not enough), but I would advice to not change this behaviour because deleting web-hooks components might break other instances of the same provider

Fyi this is where this behaviour is described https://master.cluster-api.sigs.k8s.io/clusterctl/commands/delete.html

@fabriziopandini Thanks for the explanation. I didn't see the documentation in the book as I was only looking at the CLI help notes when I reported this behavior.

After reading through the docs and playing around some more I realize now that we are sharing one webhook controller in the capi-webhook-system namespace for all the provider controllers installed in other namespaces.

Apologies for the confusion, I'm still wrapping my head around the shared webhook changes that were made. That's why in the description of this issue I mentioned that I didn't know what the expected behavior was.

/close

@wfernandes: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dlipovetsky picture dlipovetsky  路  5Comments

fabriziopandini picture fabriziopandini  路  5Comments

wfernandes picture wfernandes  路  5Comments

chaosaffe picture chaosaffe  路  6Comments

jsturtevant picture jsturtevant  路  5Comments