Merge pull request #30362 from lixiaobing10051267/masterAppsClient

Automatic merge from submit-queue

check validation with no apps client in kubectl util factory

autoscaling client already exist:

		if c.c.AutoscalingClient == nil {
			return errors.New("unable to validate: no autoscaling client")

so following autoscaling client should be apps client:

		if c.c.AppsClient == nil {
			return errors.New("unable to validate: no autoscaling client")
		}

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30362)
<!-- Reviewable:end -->
This commit is contained in:
Kubernetes Submit Queue 2016-08-11 12:54:14 -07:00 committed by GitHub
commit 91a3930331

View File

@ -1080,7 +1080,7 @@ func (c *clientSwaggerSchema) ValidateBytes(data []byte) error {
} }
if gvk.Group == apps.GroupName { if gvk.Group == apps.GroupName {
if c.c.AppsClient == nil { if c.c.AppsClient == nil {
return errors.New("unable to validate: no autoscaling client") return errors.New("unable to validate: no apps client")
} }
return getSchemaAndValidate(c.c.AppsClient.RESTClient, data, "apis/", gvk.GroupVersion().String(), c.cacheDir, c) return getSchemaAndValidate(c.c.AppsClient.RESTClient, data, "apis/", gvk.GroupVersion().String(), c.cacheDir, c)
} }