vmware-archive / kops

Kubernetes Operations (kops) - Production Grade K8s Installation, Upgrades, and Management
Apache License 2.0
3 stars 3 forks source link

Removed hardcode from protokube logic. Fixes #15. #46

Closed prashima closed 7 years ago

prashima commented 7 years ago

Changes:

Populating volume metadata based on actual zone name passed in 'kops cluster create' command. Updated protokube code to use volume metadata and create volume and etcd cluster spec. Testing:

Ran 'make ci'

Successfully deployed cluster with following command, please note the 'zone' argument-

kops create cluster --cloud=vsphere --name=v2c2.skydns.local --zones=vmw-zone --vsphere-server=10.160.236.59 --vsphere-datacenter=VSAN-DC --vsphere-resource-pool=VSAN-Cluster --vsphere-datastore=vsanDatastore --dns=private --vsphere-coredns-server=http://10.160.227.86:2379 --dns-zone=skydns.local --image=ubuntu_16_04 --node-count=2 --networking=flannel --yes

Checked protokube logs to make sure correct volume data is getting populated, along with etcd cluster information. Here is the log snippet- I0411 18:18:00.874477 1 vsphere_volume.go:88] Found volumes: [{"ID":"01","LocalDevice":"/dev/sdb1","AttachedTo":"10.160.249.78","Mountpoint":"/mnt/master-01","Status":"attached","Info":{"Description":"main","EtcdClusters":[{"clusterKey":"main","nodeName":"e","nodeNames":["e"]}]}} {"ID":"02","LocalDevice":"/dev/sdc1","AttachedTo":"10.160.249.78","Mountpoint":"/mnt/master-02","Status":"attached","Info":{"Description":"events","EtcdClusters":[{"clusterKey":"events","nodeName":"e","nodeNames":["e"]}]}}]

luomiao commented 7 years ago

This conflicts with Abrar's latest commit... sorry that you need to rebase again :)

prashima commented 7 years ago

Rebased and tested my changes again.

luomiao commented 7 years ago

LGTM