mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 14:23:37 +00:00
Merge pull request #126342 from aramase/aramase/c/auth_rm_unused_function
cleanup unused fn IsValidServiceAccountKeyFile in authenticator config
This commit is contained in:
commit
bbd1dd8c6f
@ -49,7 +49,6 @@ import (
|
||||
|
||||
// Initialize all known client auth plugins.
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
"k8s.io/client-go/util/keyutil"
|
||||
"k8s.io/kubernetes/pkg/serviceaccount"
|
||||
)
|
||||
|
||||
@ -325,12 +324,6 @@ func (c *authenticationConfigUpdater) updateAuthenticationConfig(ctx context.Con
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsValidServiceAccountKeyFile returns true if a valid public RSA key can be read from the given file
|
||||
func IsValidServiceAccountKeyFile(file string) bool {
|
||||
_, err := keyutil.PublicKeysFromFile(file)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// newAuthenticatorFromTokenFile returns an authenticator.Token or an error
|
||||
func newAuthenticatorFromTokenFile(tokenAuthFile string) (authenticator.Token, error) {
|
||||
tokenAuthenticator, err := tokenfile.NewCSV(tokenAuthFile)
|
||||
|
Loading…
Reference in New Issue
Block a user