@@ -29,7 +29,6 @@ import (
2929 "github.com/digitalocean/godo"
3030 "golang.org/x/oauth2"
3131
32- "k8s.io/kops/protokube/pkg/etcd"
3332 "k8s.io/kops/protokube/pkg/gossip"
3433 gossipdo "k8s.io/kops/protokube/pkg/gossip/do"
3534)
@@ -154,31 +153,6 @@ func NewDOCloud() (*godo.Client, error) {
154153 return client , nil
155154}
156155
157- // getEtcdClusterSpec returns etcd.EtcdClusterSpec which holds
158- // necessary information required for starting an etcd server.
159- // DigitalOcean support on kops only supports single master setup for now
160- // but in the future when it supports multiple masters this method be
161- // updated to handle that case.
162- // TODO: use tags once it's supported for volumes
163- func (d * DOCloudProvider ) getEtcdClusterSpec (vol godo.Volume ) (* etcd.EtcdClusterSpec , error ) {
164- nodeName := d .dropletName
165-
166- var clusterKey string
167- if strings .Contains (vol .Name , "etcd-main" ) {
168- clusterKey = "main"
169- } else if strings .Contains (vol .Name , "etcd-events" ) {
170- clusterKey = "events"
171- } else {
172- return nil , fmt .Errorf ("could not determine etcd cluster type for volume: %s" , vol .Name )
173- }
174-
175- return & etcd.EtcdClusterSpec {
176- ClusterKey : clusterKey ,
177- NodeName : nodeName ,
178- NodeNames : []string {nodeName },
179- }, nil
180- }
181-
182156func (d * DOCloudProvider ) GossipSeeds () (gossip.SeedProvider , error ) {
183157 for _ , dropletTag := range d .dropletTags {
184158 if strings .Contains (dropletTag , strings .ReplaceAll (d .ClusterID , "." , "-" )) {
0 commit comments