@mittwald/kubernetes
Version:
Kubernetes client library
28 lines (27 loc) • 1.23 kB
TypeScript
/// <reference types="node" />
import { Config } from "./types/config";
import { AxiosRequestConfig } from "axios";
import { SecureClientSessionOptions } from "http2";
export interface IKubernetesClientConfig {
apiServerURL: string;
namespace: string;
mapAxiosOptions<T extends AxiosRequestConfig = AxiosRequestConfig>(opts: T): T;
mapNativeOptions<T extends SecureClientSessionOptions = SecureClientSessionOptions>(opts: T): T;
mapHeaders(headers: Record<string, string>): Record<string, string>;
}
export declare class GenericClientConfig implements IKubernetesClientConfig {
private readonly kubeconfig;
apiServerURL: string;
namespace: string;
constructor(kubeconfig: Config);
private getHTTPSAgentOptions;
mapNativeOptions<T extends SecureClientSessionOptions = SecureClientSessionOptions>(opts: T): T;
mapHeaders(headers: Record<string, string>): Record<string, string>;
mapAxiosOptions<T extends AxiosRequestConfig = AxiosRequestConfig>(opts: T): T;
}
export declare class FileBasedConfig extends GenericClientConfig {
constructor(kubeconfigFile: string);
}
export declare class InClusterConfig extends GenericClientConfig {
constructor(namespace?: string);
}