mirror of https://github.com/k3s-io/k3s
Move VagrantCloud into its own pkg
parent
b23bef26eb
commit
eb9f3394c5
|
@ -29,6 +29,7 @@ import (
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/gce"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/gce"
|
||||||
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/vagrant"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/master"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/master"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
verflag "github.com/GoogleCloudPlatform/kubernetes/pkg/version/flag"
|
verflag "github.com/GoogleCloudPlatform/kubernetes/pkg/version/flag"
|
||||||
|
@ -86,7 +87,7 @@ func main() {
|
||||||
}
|
}
|
||||||
case "vagrant":
|
case "vagrant":
|
||||||
var err error
|
var err error
|
||||||
cloud, err = cloudprovider.NewVagrantCloud()
|
cloud, err = vagrant_cloud.NewVagrantCloud()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Couldn't connect to vagrant cloud: %#v", err)
|
glog.Fatalf("Couldn't connect to vagrant cloud: %#v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudprovider
|
package vagrant_cloud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -24,6 +24,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
neturl "net/url"
|
neturl "net/url"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VagrantCloud is an implementation of Interface, TCPLoadBalancer and Instances for developer managed Vagrant cluster
|
// VagrantCloud is an implementation of Interface, TCPLoadBalancer and Instances for developer managed Vagrant cluster
|
||||||
|
@ -72,17 +74,17 @@ func NewVagrantCloud() (*VagrantCloud, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TCPLoadBalancer returns an implementation of TCPLoadBalancer for Vagrant cloud
|
// TCPLoadBalancer returns an implementation of TCPLoadBalancer for Vagrant cloud
|
||||||
func (v *VagrantCloud) TCPLoadBalancer() (TCPLoadBalancer, bool) {
|
func (v *VagrantCloud) TCPLoadBalancer() (cloudprovider.TCPLoadBalancer, bool) {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instances returns an implementation of Instances for Vagrant cloud
|
// Instances returns an implementation of Instances for Vagrant cloud
|
||||||
func (v *VagrantCloud) Instances() (Instances, bool) {
|
func (v *VagrantCloud) Instances() (cloudprovider.Instances, bool) {
|
||||||
return v, true
|
return v, true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zones returns an implementation of Zones for Vagrant cloud
|
// Zones returns an implementation of Zones for Vagrant cloud
|
||||||
func (v *VagrantCloud) Zones() (Zones, bool) {
|
func (v *VagrantCloud) Zones() (cloudprovider.Zones, bool) {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudprovider
|
package vagrant_cloud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
Loading…
Reference in New Issue