Skip to content

Class: KubeApi ‹T#

Type parameters#

T: KubeObject

Hierarchy#

  • KubeApi

PodsApi

NodesApi

DeploymentApi

IngressApi

PersistentVolumeClaimsApi

Index#

Constructors#

Properties#

Accessors#

Methods#

Constructors#

constructor#

+ new KubeApi(options: IKubeApiOptions‹T›): KubeApi

Defined in src/renderer/api/kube-api.ts:123

Parameters:

Name Type
options IKubeApiOptions‹T›

Returns: KubeApi

Properties#

apiBase#

apiBase: string

Defined in src/renderer/api/kube-api.ts:112


apiGroup#

apiGroup: string

Defined in src/renderer/api/kube-api.ts:114


apiPrefix#

apiPrefix: string

Defined in src/renderer/api/kube-api.ts:113


apiResource#

apiResource: string

Defined in src/renderer/api/kube-api.ts:117


apiVersion#

apiVersion: string

Defined in src/renderer/api/kube-api.ts:115


Optional apiVersionPreferred#

apiVersionPreferred? : string

Defined in src/renderer/api/kube-api.ts:116


isNamespaced#

isNamespaced: boolean

Defined in src/renderer/api/kube-api.ts:118


kind#

kind: string

Defined in src/renderer/api/kube-api.ts:111


objectConstructor#

objectConstructor: IKubeObjectConstructor‹T›

Defined in src/renderer/api/kube-api.ts:120


Protected options#

options: IKubeApiOptions‹T›

Defined in src/renderer/api/kube-api.ts:125


Protected request#

request: KubeJsonApi

Defined in src/renderer/api/kube-api.ts:121


Protected resourceVersions#

resourceVersions: Map‹string, string› = new Map()

Defined in src/renderer/api/kube-api.ts:122


Protected watchDisposer#

watchDisposer: function

Defined in src/renderer/api/kube-api.ts:123

Type declaration:#

▸ (): void

Accessors#

apiVersionWithGroup#

get apiVersionWithGroup(): string

Defined in src/renderer/api/kube-api.ts:153

Returns: string

Methods#

Protected checkPreferredVersion#

checkPreferredVersion(): Promise‹void›

Defined in src/renderer/api/kube-api.ts:215

Returns: Promise‹void›


create#

create(__namedParameters: object, data?: Partial‹T›): Promise‹T | null›

Defined in src/renderer/api/kube-api.ts:353

Parameters:

Default value __namedParameters: object= {}

Name Type Default
name string ""
namespace string "default"

Optional data: Partial‹T›

Returns: Promise‹T | null›


delete#

delete(__namedParameters: object): Promise‹KubeJsonApiData›

Defined in src/renderer/api/kube-api.ts:390

Parameters:

__namedParameters: object

Name Type Default
name string ""
namespace string "default"

Returns: Promise‹KubeJsonApiData›


get#

get(__namedParameters: object, query?: IKubeApiQueryParams): Promise‹T | null›

Defined in src/renderer/api/kube-api.ts:339

Parameters:

Default value __namedParameters: object= {}

Name Type Default
name string ""
namespace string "default"

Optional query: IKubeApiQueryParams

Returns: Promise‹T | null›


getResourceVersion#

getResourceVersion(namespace: string): string

Defined in src/renderer/api/kube-api.ts:248

Parameters:

Name Type Default
namespace string ""

Returns: string


getUrl#

getUrl(__namedParameters: object, query?: Partial‹IKubeApiQueryParams›): string

Defined in src/renderer/api/kube-api.ts:256

Parameters:

Default value __namedParameters: object= {}

Name Type Default
name string ""
namespace string ""

Optional query: Partial‹IKubeApiQueryParams›

Returns: string


getWatchUrl#

getWatchUrl(namespace: string, query: IKubeApiQueryParams): string

Defined in src/renderer/api/kube-api.ts:397

Parameters:

Name Type Default
namespace string ""
query IKubeApiQueryParams {}

Returns: string


list#

list(__namedParameters: object, query?: IKubeApiQueryParams): Promise‹T[] | null›

Defined in src/renderer/api/kube-api.ts:321

Parameters:

Default value __namedParameters: object= {}

Name Type Default
namespace string ""
reqInit RequestInit -

Optional query: IKubeApiQueryParams

Returns: Promise‹T[] | null›


Protected modifyWatchEvent#

modifyWatchEvent(event: IKubeWatchEvent): void

Defined in src/renderer/api/kube-api.ts:462

Parameters:

Name Type
event IKubeWatchEvent

Returns: void


Protected normalizeQuery#

normalizeQuery(query: Partial‹IKubeApiQueryParams›): object

Defined in src/renderer/api/kube-api.ts:268

Parameters:

Name Type Default
query Partial‹IKubeApiQueryParams› {}

Returns: object


Protected parseResponse#

parseResponse(data: unknown, namespace?: string): T | T[] | null

Defined in src/renderer/api/kube-api.ts:280

Parameters:

Name Type
data unknown
namespace? string

Returns: T | T[] | null


refreshResourceVersion#

refreshResourceVersion(params?: KubeApiListOptions): Promise‹T[]›

Defined in src/renderer/api/kube-api.ts:252

Parameters:

Name Type
params? KubeApiListOptions

Returns: Promise‹T[]›


setResourceVersion#

setResourceVersion(namespace: string, newVersion: string): void

Defined in src/renderer/api/kube-api.ts:244

Parameters:

Name Type Default
namespace string ""
newVersion string -

Returns: void


update#

update(__namedParameters: object, data?: Partial‹T›): Promise‹T | null›

Defined in src/renderer/api/kube-api.ts:376

Parameters:

Default value __namedParameters: object= {}

Name Type Default
name string ""
namespace string "default"

Optional data: Partial‹T›

Returns: Promise‹T | null›


watch#

watch(opts: KubeApiWatchOptions): function

Defined in src/renderer/api/kube-api.ts:405

Parameters:

Name Type Default
opts KubeApiWatchOptions { namespace: "" }

Returns: function

▸ (): void