Skip to content

Commit

Permalink
create cloudprovider "providers" package
Browse files Browse the repository at this point in the history
    move all providers into new package
    update all references to old package path
  • Loading branch information
stensonb committed Aug 12, 2015
1 parent 5a9b36b commit 9541414
Show file tree
Hide file tree
Showing 41 changed files with 43 additions and 33 deletions.
8 changes: 1 addition & 7 deletions cmd/kube-apiserver/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@ package app
// given binary target.
import (
// Cloud providers
_ "k8s.io/kubernetes/pkg/cloudprovider/aws"
_ "k8s.io/kubernetes/pkg/cloudprovider/gce"
_ "k8s.io/kubernetes/pkg/cloudprovider/mesos"
_ "k8s.io/kubernetes/pkg/cloudprovider/openstack"
_ "k8s.io/kubernetes/pkg/cloudprovider/ovirt"
_ "k8s.io/kubernetes/pkg/cloudprovider/rackspace"
_ "k8s.io/kubernetes/pkg/cloudprovider/vagrant"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"

// Admission policies
_ "k8s.io/kubernetes/plugin/pkg/admission/admit"
Expand Down
8 changes: 1 addition & 7 deletions cmd/kube-controller-manager/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ import (
// given binary target.

//Cloud providers
_ "k8s.io/kubernetes/pkg/cloudprovider/aws"
_ "k8s.io/kubernetes/pkg/cloudprovider/gce"
_ "k8s.io/kubernetes/pkg/cloudprovider/mesos"
_ "k8s.io/kubernetes/pkg/cloudprovider/openstack"
_ "k8s.io/kubernetes/pkg/cloudprovider/ovirt"
_ "k8s.io/kubernetes/pkg/cloudprovider/rackspace"
_ "k8s.io/kubernetes/pkg/cloudprovider/vagrant"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"

// Volume plugins
"k8s.io/kubernetes/pkg/volume"
Expand Down
8 changes: 1 addition & 7 deletions cmd/kubelet/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ import (
"k8s.io/kubernetes/pkg/volume/rbd"
"k8s.io/kubernetes/pkg/volume/secret"
//Cloud providers
_ "k8s.io/kubernetes/pkg/cloudprovider/aws"
_ "k8s.io/kubernetes/pkg/cloudprovider/gce"
_ "k8s.io/kubernetes/pkg/cloudprovider/mesos"
_ "k8s.io/kubernetes/pkg/cloudprovider/openstack"
_ "k8s.io/kubernetes/pkg/cloudprovider/ovirt"
_ "k8s.io/kubernetes/pkg/cloudprovider/rackspace"
_ "k8s.io/kubernetes/pkg/cloudprovider/vagrant"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
)

// ProbeVolumePlugins collects all volume plugins into an easy to use list.
Expand Down
2 changes: 1 addition & 1 deletion contrib/mesos/pkg/controllermanager/controllermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"k8s.io/kubernetes/pkg/client/clientcmd"
clientcmdapi "k8s.io/kubernetes/pkg/client/clientcmd/api"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/cloudprovider/mesos"
"k8s.io/kubernetes/pkg/cloudprovider/providers/mesos"
kendpoint "k8s.io/kubernetes/pkg/controller/endpoint"
"k8s.io/kubernetes/pkg/controller/namespace"
"k8s.io/kubernetes/pkg/controller/node"
Expand Down
2 changes: 1 addition & 1 deletion docs/devel/writing-a-getting-started-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Just file an issue or chat us on IRC and one of the committers will link to it f

These guidelines say *what* to do. See the Rationale section for *why*.
- the main reason to add a new development distro is to support a new IaaS provider (VM and
network management). This means implementing a new `pkg/cloudprovider/$IAAS_NAME`.
network management). This means implementing a new `pkg/cloudprovider/providers/$IAAS_NAME`.
- Development distros should use Saltstack for Configuration Management.
- development distros need to support automated cluster creation, deletion, upgrading, etc.
This mean writing scripts in `cluster/$IAAS_NAME`.
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started-guides/scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,15 @@ Apiserver supports several cloud providers.

- options for `--cloud-provider` flag are `aws`, `gce`, `mesos`, `openshift`, `ovirt`, `rackspace`, `vagrant`, or unset.
- unset used for e.g. bare metal setups.
- support for new IaaS is added by contributing code [here](../../pkg/cloudprovider/)
- support for new IaaS is added by contributing code [here](../../pkg/cloudprovider/providers/)

Some cloud providers require a config file. If so, you need to put config file into apiserver image or mount through hostPath.

- `--cloud-config=` set if cloud provider requires a config file.
- Used by `aws`, `gce`, `mesos`, `openshift`, `ovirt` and `rackspace`.
- You must put config file into apiserver image or mount through hostPath.
- Cloud config file syntax is [Gcfg](https://code.google.com/p/gcfg/).
- AWS format defined by type [AWSCloudConfig](../../pkg/cloudprovider/aws/aws.go)
- AWS format defined by type [AWSCloudConfig](../../pkg/cloudprovider/providers/aws/aws.go)
- There is a similar type in the corresponding file for other cloud providers.
- GCE example: search for `gce.conf` in [this file](../../cluster/gce/configure-vm.sh)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* [Angus Lees](https://github.com/anguslees)


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/cloudprovider/openstack/MAINTAINERS.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/cloudprovider/providers/openstack/MAINTAINERS.md?pixel)]()
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions pkg/cloudprovider/providers/providers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright 2015 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cloudprovider

import (
// Cloud providers
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/gce"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/mesos"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/openstack"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/ovirt"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/rackspace"
_ "k8s.io/kubernetes/pkg/cloudprovider/providers/vagrant"
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* [Thom May](https://github.com/thommay)


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/cloudprovider/rackspace/MAINTAINERS.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/cloudprovider/providers/rackspace/MAINTAINERS.md?pixel)]()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/controller/route/routecontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/cloudprovider/fake"
"k8s.io/kubernetes/pkg/cloudprovider/providers/fake"
)

func TestIsResponsibleForRoute(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/service/servicecontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/client/testclient"
fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/fake"
fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake"
"k8s.io/kubernetes/pkg/types"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/aws_ebs/aws_ebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/cloudprovider/aws"
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/exec"
Expand Down
2 changes: 1 addition & 1 deletion pkg/volume/gce_pd/gce_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/golang/glog"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/cloudprovider/gce"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/exec"
"k8s.io/kubernetes/pkg/util/mount"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"k8s.io/kubernetes/pkg/api/latest"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/client"
"k8s.io/kubernetes/pkg/cloudprovider/aws"
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/resize_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/kubernetes/pkg/cloudprovider/aws"
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
)

const (
Expand Down

0 comments on commit 9541414

Please sign in to comment.