use extensions client with explicit version

This commit is contained in:
supereagle
2017-11-18 15:00:21 +08:00
parent e570831443
commit 9c02d7e38c
16 changed files with 42 additions and 42 deletions

View File

@@ -215,7 +215,7 @@ func CheckDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName,
func CreateDeployment(client clientset.Interface, replicas int32, podLabels map[string]string, namespace string, pvclaims []*v1.PersistentVolumeClaim, command string) (*extensions.Deployment, error) {
deploymentSpec := MakeDeployment(replicas, podLabels, namespace, pvclaims, false, command)
deployment, err := client.Extensions().Deployments(namespace).Create(deploymentSpec)
deployment, err := client.ExtensionsV1beta1().Deployments(namespace).Create(deploymentSpec)
if err != nil {
return nil, fmt.Errorf("deployment %q Create API error: %v", deploymentSpec.Name, err)
}