| ... | ... |
@@ -5,10 +5,12 @@ import ( |
| 5 | 5 |
"os" |
| 6 | 6 |
|
| 7 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 8 |
+ klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
|
| 8 | 9 |
kubeclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
| 9 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 10 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
| 11 | 12 |
"github.com/golang/glog" |
| 13 |
+ latest "github.com/openshift/origin/pkg/api/latest" |
|
| 12 | 14 |
osclient "github.com/openshift/origin/pkg/client" |
| 13 | 15 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
| 14 | 16 |
"gopkg.in/v1/yaml" |
| ... | ... |
@@ -29,13 +31,13 @@ func main() {
|
| 29 | 29 |
glog.Fatalf("Unable to parse %v as a URL\n", err)
|
| 30 | 30 |
} |
| 31 | 31 |
|
| 32 |
- client, err := kubeclient.New(masterServer, nil) |
|
| 32 |
+ client, err := kubeclient.New(masterServer, klatest.Version, nil) |
|
| 33 | 33 |
if err != nil {
|
| 34 | 34 |
glog.Errorf("Unable to connect to kubernetes master: %v", err)
|
| 35 | 35 |
os.Exit(1) |
| 36 | 36 |
} |
| 37 | 37 |
|
| 38 |
- osClient, err := osclient.New(masterServer, nil) |
|
| 38 |
+ osClient, err := osclient.New(masterServer, latest.Version, nil) |
|
| 39 | 39 |
if err != nil {
|
| 40 | 40 |
glog.Errorf("Unable to connect to openshift master: %v", err)
|
| 41 | 41 |
os.Exit(1) |
| ... | ... |
@@ -66,7 +68,7 @@ func deployTarget(client *kubeclient.Client, osClient osclient.Interface) {
|
| 66 | 66 |
return |
| 67 | 67 |
} |
| 68 | 68 |
|
| 69 |
- controller := api.ReplicationController{
|
|
| 69 |
+ controller := &api.ReplicationController{
|
|
| 70 | 70 |
DesiredState: deployment.ControllerTemplate, |
| 71 | 71 |
Labels: map[string]string{"deployment": deployment.ConfigID},
|
| 72 | 72 |
} |