Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

exec enable cmd ignore ignore some apiservices error #1334

Merged
merged 2 commits into from
Jan 25, 2021

Conversation

huiwq1990
Copy link
Contributor

What this PR does / why we need it:

When execute command kubefedctl enable clusterrole,if some apiservices have error(like v1alpha1.wardle.example.com), command will fail. We could ignore the error if apiserver has the resource, just like kubectl api-resource return data and error.

[root@tpaas ~]# kubectl get apiservice
NAME                                   SERVICE      AVAILABLE                  AGE
v1alpha1.scheduling.kubefed.io         Local        True                       2d3h
v1alpha1.wardle.example.com            wardle/api   False (MissingEndpoints)   67m
v1beta1.admissionregistration.k8s.io   Local        True                       3d23h


[root@tpaas ~]# kubefedctl enable clusterrole
F1230 00:12:28.599723    5416 enable.go:111] Error: Error listing api resources: unable to retrieve the complete list of server APIs: wardle.example.com/v1alpha1: the server is currently unable to handle the request

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 #

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 29, 2020
@huiwq1990
Copy link
Contributor Author

/assign @hectorj2f

@hectorj2f
Copy link
Contributor

@huiwq1990 I'll have a look to your PR today.

Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hectorj2f, huiwq1990

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit c999f0d into kubernetes-retired:master Jan 25, 2021
@huiwq1990 huiwq1990 deleted the fix-enableIgnoreErr branch March 5, 2021 04:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants