Browse code

Merge pull request #2320 from markturansky/add_pvcbinder

Merged by openshift-bot

OpenShift Bot authored on 2015/05/20 03:47:13
Showing 2 changed files
... ...
@@ -19,6 +19,7 @@ import (
19 19
 	"github.com/GoogleCloudPlatform/kubernetes/pkg/resourcequota"
20 20
 	"github.com/GoogleCloudPlatform/kubernetes/pkg/service"
21 21
 	"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
22
+	"github.com/GoogleCloudPlatform/kubernetes/pkg/volumeclaimbinder"
22 23
 	"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler"
23 24
 	_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider"
24 25
 	schedulerapi "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/api"
... ...
@@ -95,6 +96,12 @@ func (c *MasterConfig) RunNamespaceController() {
95 95
 	glog.Infof("Started Kubernetes Namespace Manager")
96 96
 }
97 97
 
98
+func (c *MasterConfig) RunPersistentVolumeClaimBinder() {
99
+	binder := volumeclaimbinder.NewPersistentVolumeClaimBinder(c.KubeClient, 5*time.Minute)
100
+	binder.Run()
101
+	glog.Infof("Started Kubernetes Persistent Volume Claim Binder")
102
+}
103
+
98 104
 // RunReplicationController starts the Kubernetes replication controller sync loop
99 105
 func (c *MasterConfig) RunReplicationController() {
100 106
 	controllerManager := controller.NewReplicationManager(c.KubeClient, controller.BurstReplicas)
... ...
@@ -358,6 +358,7 @@ func StartMaster(openshiftMasterConfig *configapi.MasterConfig) error {
358 358
 		kubeConfig.RunMinionController()
359 359
 		kubeConfig.RunResourceQuotaManager()
360 360
 		kubeConfig.RunNamespaceController()
361
+		kubeConfig.RunPersistentVolumeClaimBinder()
361 362
 
362 363
 	} else {
363 364
 		_, kubeConfig, err := configapi.GetKubeClient(openshiftMasterConfig.MasterClients.ExternalKubernetesKubeConfig)