Upgrade k8s package verison (#5358)
* upgrade k8s package version Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> * Script upgrade and code formatting. Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
@@ -63,7 +63,7 @@ func NewLookupFunction(config *rest.Config) lookupFunc {
|
||||
}
|
||||
return obj.UnstructuredContent(), nil
|
||||
}
|
||||
//this will return a list
|
||||
// this will return a list
|
||||
obj, err := client.List(context.Background(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
@@ -112,7 +112,7 @@ func getAPIResourceForGVK(gvk schema.GroupVersionKind, config *rest.Config) (met
|
||||
return res, err
|
||||
}
|
||||
for _, resource := range resList.APIResources {
|
||||
//if a resource contains a "/" it's referencing a subresource. we don't support suberesource for now.
|
||||
// if a resource contains a "/" it's referencing a subresource. we don't support suberesource for now.
|
||||
if resource.Kind == gvk.Kind && !strings.Contains(resource.Name, "/") {
|
||||
res = resource
|
||||
res.Group = gvk.Group
|
||||
|
||||
Reference in New Issue
Block a user