update InterfacesFor to use GroupVersion

This commit is contained in:
deads2k
2015-12-08 13:27:26 -05:00
parent 8535f13a2b
commit ec87d74ecb
17 changed files with 50 additions and 44 deletions

View File

@@ -280,10 +280,15 @@ func (s *APIServer) verifyClusterIPFlags() {
type newEtcdFunc func([]string, meta.VersionInterfacesFunc, string, string) (storage.Interface, error)
func newEtcd(etcdServerList []string, interfacesFunc meta.VersionInterfacesFunc, storageVersion, pathPrefix string) (etcdStorage storage.Interface, err error) {
if storageVersion == "" {
func newEtcd(etcdServerList []string, interfacesFunc meta.VersionInterfacesFunc, storageGroupVersionString, pathPrefix string) (etcdStorage storage.Interface, err error) {
if storageGroupVersionString == "" {
return etcdStorage, fmt.Errorf("storageVersion is required to create a etcd storage")
}
storageVersion, err := unversioned.ParseGroupVersion(storageGroupVersionString)
if err != nil {
return nil, err
}
var storageConfig etcdstorage.EtcdConfig
storageConfig.ServerList = etcdServerList
storageConfig.Prefix = pathPrefix