Skip to content

Commit fbcf074

Browse files
pfarkyaprfarkya
authored andcommitted
FEAT: Adding support for multiple client
1 parent edc3e40 commit fbcf074

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
@@ -39,7 +39,7 @@ function fileExists(filepath: string): boolean {
3939
}
4040

4141
export class KubeConfig {
42-
private static authenticators: Authenticator[] = [
42+
private authenticators: Authenticator[] = [
4343
new AzureAuth(),
4444
new GoogleCloudPlatformAuth(),
4545
new ExecAuth(),
@@ -450,7 +450,7 @@ export class KubeConfig {
450450
if (!user) {
451451
return;
452452
}
453-
const authenticator = KubeConfig.authenticators.find((elt: Authenticator) => {
453+
const authenticator = this.authenticators.find((elt: Authenticator) => {
454454
return elt.isAuthProvider(user);
455455
});
456456

src/config_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ describe('KubeConfig', () => {
11691169
// TODO: inject the exec command here?
11701170
const opts = {} as requestlib.Options;
11711171
await config.applyToRequest(opts);
1172-
let execAuthenticator = (KubeConfig as any).authenticators.find(
1172+
let execAuthenticator = (config as any).authenticators.find(
11731173
(authenticator) => authenticator instanceof ExecAuth,
11741174
);
11751175
expect(execAuthenticator.tokenCache['exec']).to.deep.equal(JSON.parse(responseStr));

0 commit comments

Comments
 (0)