mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
apiserver: add context to authn/authz kubeconfig errors
This commit is contained in:
parent
60cd056cb4
commit
99eda24de0
@ -266,7 +266,7 @@ func (s *DelegatingAuthenticationOptions) getRequestHeader() (*RequestHeaderAuth
|
|||||||
func (s *DelegatingAuthenticationOptions) lookupInClusterClientCA() (*ClientCertAuthenticationOptions, error) {
|
func (s *DelegatingAuthenticationOptions) lookupInClusterClientCA() (*ClientCertAuthenticationOptions, error) {
|
||||||
clientConfig, err := s.getClientConfig()
|
clientConfig, err := s.getClientConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("failed to get delegated authentication kubeconfig: %v", err)
|
||||||
}
|
}
|
||||||
client, err := coreclient.NewForConfig(clientConfig)
|
client, err := coreclient.NewForConfig(clientConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||||||
package options
|
package options
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
@ -125,7 +126,7 @@ func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorization
|
|||||||
clientConfig, err = rest.InClusterConfig()
|
clientConfig, err = rest.InClusterConfig()
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("failed to get delegated authorization kubeconfig: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set high qps/burst limits since this will effectively limit API server responsiveness
|
// set high qps/burst limits since this will effectively limit API server responsiveness
|
||||||
|
Loading…
Reference in New Issue
Block a user