Skip to content

FIX: Adding support for multiple client #2514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function fileExists(filepath: string): boolean {
export interface ApiType {}

export class KubeConfig implements SecurityAuthentication {
private static authenticators: Authenticator[] = [
private authenticators: Authenticator[] = [
new AzureAuth(),
new GoogleCloudPlatformAuth(),
new ExecAuth(),
Expand Down Expand Up @@ -596,7 +596,7 @@ export class KubeConfig implements SecurityAuthentication {
if (!user) {
return;
}
let authenticator = KubeConfig.authenticators.find((elt: Authenticator) => {
let authenticator = this.authenticators.find((elt: Authenticator) => {
return elt.isAuthProvider(user);
});

Expand Down
2 changes: 1 addition & 1 deletion src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ describe('KubeConfig', () => {
// TODO: inject the exec command here?
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
const execAuthenticator = (KubeConfig as any).authenticators.find(
const execAuthenticator = (config as any).authenticators.find(
(authenticator) => authenticator instanceof ExecAuth,
);
deepStrictEqual(execAuthenticator.tokenCache.exec, JSON.parse(responseStr));
Expand Down