UNPKG

1.22 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Config } from "./types/config";
3import { AxiosRequestConfig } from "axios";
4import { SecureClientSessionOptions } from "http2";
5export interface IKubernetesClientConfig {
6 apiServerURL: string;
7 namespace: string;
8 mapAxiosOptions<T extends AxiosRequestConfig = AxiosRequestConfig>(opts: T): T;
9 mapNativeOptions<T extends SecureClientSessionOptions = SecureClientSessionOptions>(opts: T): T;
10 mapHeaders(headers: Record<string, string>): Record<string, string>;
11}
12export declare class GenericClientConfig implements IKubernetesClientConfig {
13 private kubeconfig;
14 apiServerURL: string;
15 namespace: string;
16 constructor(kubeconfig: Config);
17 private getHTTPSAgentOptions;
18 mapNativeOptions<T extends SecureClientSessionOptions = SecureClientSessionOptions>(opts: T): T;
19 mapHeaders(headers: Record<string, string>): Record<string, string>;
20 mapAxiosOptions<T extends AxiosRequestConfig = AxiosRequestConfig>(opts: T): T;
21}
22export declare class FileBasedConfig extends GenericClientConfig {
23 constructor(kubeconfigFile: string);
24}
25export declare class InClusterConfig extends GenericClientConfig {
26 constructor(namespace?: string);
27}