Cluster-api: Propose set `bootstrap-cluster-cleanup` as false by default

Created on 20 Mar 2019  路  11Comments  路  Source: kubernetes-sigs/cluster-api

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

What did you expect to happen:
Currently, the bootstrap cluster was always deleted by default https://github.com/kubernetes-sigs/cluster-api/blob/master/cmd/clusterctl/clusterdeployer/bootstrap/options.go#L30 , why? How about set the default value of bootstrap-cluster-cleanup as false? It will save time to create cluster again and again.

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

Environment:

  • Cluster-api version: master
  • Kubernetes version: (use kubectl version):

  • OS (e.g. from /etc/os-release):

root@gyliu-dev1:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
areclusterctl kinbug

All 11 comments

FYI @xunpan @morvencao @jichenjc @clyang82

@dims any comments for this? Thanks.

/milestone Next

The original goal was to treat the bootstrapping cluster as temporary (with the exception of specifying an external bootstrap cluster). I'm not entirely sure we should move away from the default expectation.

@detiber @vincepri but I have an issue here https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/267#issue-423084291

The problem is that my minikube cluster was always deleted which is not the bootstrap cluster.

@gyliu513 I think you are saying that the minikube is NOT created by clusterctl command? so we have to check whether it's created by clusterclt and should not touch anything that created before the command?

Thanks @jichenjc , if you go through the case of https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/267#issue-423084291 , you will get more detail.

1) I set up a minikube cluster.
2) In my minikube cluster, I run clusterctl create with openstack provider, and this will trigger a new minikube cluster.
3) Due to some network issue, my clusterctl create failed and timeout after 30 mins.
4) At last, my minikube cluster which is not created by clusterctl create was also deleted, I think this is not right. The delete bootstrap cluster should only delete the bootstrap cluster, but not my minikube cluster.

exactly same thought to my understanding, @gyliu513 ,so I think that's a bug and suggest we can work here to fix :)

Ah, thanks for the additional context, it definitely sounds like a bug with the way we are using minikube. What we probably need to do is set a name for the minikube cluster by default (like we do with KIND).

Thanks @detiber +1 to adding a name, let me try to create a PR.

/area clusterctl

This is not a problem any more, as we can set cluster name for both Minikube and Kind now.

Was this page helpful?
0 / 5 - 0 ratings