Skip to content

Commit b3ff0b6

Browse files
committed
FIX: Adding support for multiple client
1 parent 27e3f21 commit b3ff0b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function fileExists(filepath: string): boolean {
5858
export interface ApiType {}
5959

6060
export class KubeConfig implements SecurityAuthentication {
61-
private static authenticators: Authenticator[] = [
61+
private authenticators: Authenticator[] = [
6262
new AzureAuth(),
6363
new GoogleCloudPlatformAuth(),
6464
new ExecAuth(),
@@ -596,7 +596,7 @@ export class KubeConfig implements SecurityAuthentication {
596596
if (!user) {
597597
return;
598598
}
599-
let authenticator = KubeConfig.authenticators.find((elt: Authenticator) => {
599+
let authenticator = this.authenticators.find((elt: Authenticator) => {
600600
return elt.isAuthProvider(user);
601601
});
602602

src/config_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ describe('KubeConfig', () => {
13451345
// TODO: inject the exec command here?
13461346
const opts = {} as RequestOptions;
13471347
await config.applyToHTTPSOptions(opts);
1348-
const execAuthenticator = (KubeConfig as any).authenticators.find(
1348+
const execAuthenticator = (config as any).authenticators.find(
13491349
(authenticator) => authenticator instanceof ExecAuth,
13501350
);
13511351
deepStrictEqual(execAuthenticator.tokenCache.exec, JSON.parse(responseStr));

0 commit comments

Comments
 (0)