Merge pull request #56367 from xiangpengzhao/gopath-externaltype

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use full gopath for externalTypes

**What this PR does / why we need it**:
Seems like @soltysh has no thread to fix the testing failure and rebase to solve the conflict in #55703. This PR cherry-pick it's commit and supersedes it to avoid the change to be rebase-blocker.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #55703

**Special notes for your reviewer**:
/cc @soltysh @sttts @smarterclayton @liggitt 

**Release note**:

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-11-27 08:22:45 -08:00 committed by GitHub
commit d65a8ac95c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 35 additions and 35 deletions

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/admission
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/admission/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/admission/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/admission/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/admissionregistration
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/admissionregistration/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/admissionregistration/v1alpha1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/admissionregistration/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/admissionregistration
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/admissionregistration/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/admissionregistration/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/admissionregistration/v1beta1

View File

@ -16,7 +16,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/apps/v1
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/apps/v1

View File

@ -17,7 +17,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/apps/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/apps/v1beta1

View File

@ -17,7 +17,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/apps/v1beta2
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta2
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/apps/v1beta2

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/authentication/v1
// +k8s:conversion-gen-external-types=k8s.io/api/authentication/v1
// +groupName=authentication.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/authentication/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/authentication/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/authentication/v1beta1
// +groupName=authentication.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/authentication/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/authorization/v1
// +k8s:conversion-gen-external-types=k8s.io/api/authorization/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/authorization/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/authorization/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/authorization/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/authorization/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/autoscaling/v1
// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/autoscaling/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/autoscaling/v2beta1
// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v2beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/autoscaling/v2beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/batch/v1
// +k8s:conversion-gen-external-types=k8s.io/api/batch/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/batch/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/batch/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/batch/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/batch/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/batch/v2alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/batch/v2alpha1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/batch/v2alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/certificates/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/certificates/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/certificates/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/core
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/core/v1
// +k8s:conversion-gen-external-types=k8s.io/api/core/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/core/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/events
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/events/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/events/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/events/v1beta1

View File

@ -16,7 +16,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/extensions/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/extensions/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/extensions/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/imagepolicy/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/imagepolicy/v1alpha1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/imagepolicy/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/networking
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/networking/v1
// +k8s:conversion-gen-external-types=k8s.io/api/networking/v1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/networking/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/policy/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/policy/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/policy/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/rbac/v1
// +k8s:conversion-gen-external-types=k8s.io/api/rbac/v1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/rbac/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/rbac/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/rbac/v1alpha1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/rbac/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/rbac/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/rbac/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/rbac/v1beta1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/scheduling
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/scheduling/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/scheduling/v1alpha1
// +groupName=scheduling.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/scheduling/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/settings
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/settings/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/settings/v1alpha1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/settings/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/storage/v1
// +k8s:conversion-gen-external-types=k8s.io/api/storage/v1
// +groupName=storage.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/storage/v1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/storage/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/api/storage/v1alpha1
// +groupName=storage.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/storage/v1alpha1

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/storage/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/storage/v1beta1
// +groupName=storage.k8s.io
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/storage/v1beta1

View File

@ -15,6 +15,6 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=../../../../../k8s.io/api/apps/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta1
package appsv1beta1 // import "k8s.io/client-go/scale/scheme/appsv1beta1"

View File

@ -15,6 +15,6 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=../../../../../k8s.io/api/apps/v1beta2
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta2
package appsv1beta2 // import "k8s.io/client-go/scale/scheme/appsv1beta2"

View File

@ -15,6 +15,6 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=../../../../../k8s.io/api/autoscaling/v1
// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v1
package autoscalingv1 // import "k8s.io/client-go/scale/scheme/autoscalingv1"

View File

@ -15,6 +15,6 @@ limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=../../../../../k8s.io/api/extensions/v1beta1
// +k8s:conversion-gen-external-types=k8s.io/api/extensions/v1beta1
package extensionsv1beta1 // import "k8s.io/client-go/scale/scheme/extensionsv1beta1"

View File

@ -279,7 +279,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
externalTypes := externalTypesValues[0]
glog.V(5).Infof(" external types tags: %q", externalTypes)
var err error
typesPkg, err = context.AddDirectory(filepath.Join(pkg.Path, externalTypes))
typesPkg, err = context.AddDirectory(externalTypes)
if err != nil {
glog.Fatalf("cannot import package %s", externalTypes)
}