Skip to content

Commit 542f037

Browse files
committed
Add tls-server-name to https requests if provided
1 parent 0d700c0 commit 542f037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ export class KubeConfig {
161161
username: user.username,
162162
};
163163
}
164+
165+
if (cluster && cluster.tlsServerName) {
166+
opts.agentOptions = { servername: cluster.tlsServerName } as https.RequestOptions;
167+
}
164168
}
165169

166170
public loadFromString(config: string, opts?: Partial<ConfigOptions>): void {

0 commit comments

Comments
 (0)