Commit 254189a5 authored by lixiaobing10051267's avatar lixiaobing10051267

check validation with no apps client in kubectl util factory

parent 0da589fa
...@@ -1080,7 +1080,7 @@ func (c *clientSwaggerSchema) ValidateBytes(data []byte) error { ...@@ -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)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment