kubespray / kubespray-cli

Easy to use command line tool for kubernetes deployment with kubespray
GNU General Public License v3.0
252 stars 62 forks source link

Fix issue about setting customized cluster name when using kubespray #104

Closed jianzj closed 7 years ago

jianzj commented 7 years ago

openstack

When using kubespray openstack to initialize environment and deploy kubernetes cluster, if you want to setup a cluster name with --cluster-name, you will always receive errors like

TASK [Create nodes network ports]
**********************************************
failed: [localhost] (item=k8s-phenomenal-ootp8f) => {"failed": true,
"item": "k8s-phenomenal-ootp8f", "msg": "Security group:
k8s-phenomenal-69k17f, was not found"}
failed: [localhost] (item=k8s-phenomenal-ystmto) => {"failed": true,
"item": "k8s-phenomenal-ystmto", "msg": "Security group:
k8s-phenomenal-69k17f, was not found"}
failed: [localhost] (item=k8s-phenomenal-k2f8sf) => {"failed": true,
"item": "k8s-phenomenal-k2f8sf", "msg": "Security group:
k8s-phenomenal-69k17f, was not found"}

That is because security group name is redefined and security group is not created with these names.

These is one issue existing, https://github.com/kubespray/kubespray-cli/issues/64

I did some code changes, which cluster_name will be changed at the first place when customer set a new one.

Please help to review and let me know if anything that I could update or improve.

Smana commented 7 years ago

Thank you and sorry i didn't do many tests on openstack